public class RawAuthenticateResponse
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static byte |
USER_PRESENT_FLAG |
Constructor and Description |
---|
RawAuthenticateResponse(byte userPresence,
long counter,
byte[] signature) |
RawAuthenticateResponse(byte userPresence,
long counter,
byte[] signature,
Crypto crypto) |
Modifier and Type | Method and Description |
---|---|
void |
checkSignature(java.lang.String appId,
java.lang.String clientData,
byte[] publicKey) |
void |
checkUserPresence() |
boolean |
equals(java.lang.Object obj) |
static RawAuthenticateResponse |
fromBase64(java.lang.String rawDataBase64,
Crypto crypto) |
long |
getCounter()
This is the big-endian representation of a counter value that the U2F device
increments every time it performs an authentication operation.
|
byte[] |
getSignature()
This is a ECDSA signature (on P-256)
|
byte |
getUserPresence()
Bit 0 is set to 1, which means that user presence was verified.
|
int |
hashCode() |
static byte[] |
packBytesToSign(byte[] appIdHash,
byte userPresence,
long counter,
byte[] challengeHash) |
public static final byte USER_PRESENT_FLAG
public RawAuthenticateResponse(byte userPresence, long counter, byte[] signature)
public RawAuthenticateResponse(byte userPresence, long counter, byte[] signature, Crypto crypto)
public static RawAuthenticateResponse fromBase64(java.lang.String rawDataBase64, Crypto crypto)
public void checkSignature(java.lang.String appId, java.lang.String clientData, byte[] publicKey) throws U2fException
U2fException
public static byte[] packBytesToSign(byte[] appIdHash, byte userPresence, long counter, byte[] challengeHash)
public byte getUserPresence()
public long getCounter()
public byte[] getSignature()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public void checkUserPresence() throws U2fException
U2fException