public class GlobalSignatureCounter extends java.lang.Object implements SignatureCounter
| Constructor and Description |
|---|
GlobalSignatureCounter()
Creates a global signature counter with the initial value 0 and an increment of 1.
|
GlobalSignatureCounter(int initialValue,
int increment)
Creates a global signature counter with the given initial value and increment.
|
| Modifier and Type | Method and Description |
|---|---|
int |
increment(com.yubico.webauthn.data.ByteArray credentialId)
Increment the signature count associated with the given credential ID.
|
int |
initialize(com.yubico.webauthn.data.ByteArray credentialId)
Initialize the signature count for a given credential ID.
|
public GlobalSignatureCounter()
public GlobalSignatureCounter(int initialValue,
int increment)
initialValue - The initial total amount of signatures.increment - The amount added to the count when increment(ByteArray) is called.public int increment(com.yubico.webauthn.data.ByteArray credentialId)
SignatureCounterNote: This does not imply that there must be a one-to-one mapping between credential IDs and signature counts.
SignatureCounter.initialize(ByteArray) must have been called for the given credential ID
before invoking this method for the first time.
increment in interface SignatureCountercredentialId - The credential ID that was just used to sign something.public int initialize(com.yubico.webauthn.data.ByteArray credentialId)
SignatureCounterWhat Initialization entails exactly is implementation-defined.
initialize in interface SignatureCountercredentialId - The credential ID.