Skip to content

Commit

Permalink
Use long for counter in OtpUri (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
kikaragyozov authored Apr 18, 2024
1 parent c7545fa commit 16e2a5e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Otp.NET/OtpUri.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public OtpUri(
OtpHashMode algorithm = OtpHashMode.Sha1,
int digits = 6,
int period = 30,
int counter = 0)
long counter = 0)
{
_ = secret ?? throw new ArgumentNullException(nameof(secret));
_ = user ?? throw new ArgumentNullException(nameof(user));
Expand Down Expand Up @@ -56,7 +56,7 @@ public OtpUri(
OtpHashMode algorithm = OtpHashMode.Sha1,
int digits = 6,
int period = 30,
int counter = 0)
long counter = 0)
: this(schema, Base32Encoding.ToString(secret), user, issuer,
algorithm, digits, period, counter)
{ }
Expand Down Expand Up @@ -102,7 +102,7 @@ public OtpUri(
/// <summary>
/// Initial counter value for HOTP. This is ignored when using TOTP.
/// </summary>
public int Counter { get; private set; }
public long Counter { get; private set; }

/// <summary>
/// Generates a Uri according to the parameters
Expand Down

1 comment on commit 16e2a5e

@Ricachavez
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HELLO

Please sign in to comment.