Counter Property
Counter
Counter value for HOTP.
C#
public Nullable<int> Counter { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> |
Remarks
The counter parameter is required when the type is HOTP. It will set the initial counter value. This property returns null if the credential type is TOTP. The server and user calculate the OTP by applying a hashing and truncating operation to Secret and Counter. The server compares the OTP it calculated against the one provided by the user. Both sides then increment the counters. The counters have to be kept in sync between the server and the user. If a user ends up not using calculated OTP, the counter on the user side will become out of sync with the server.