public class ProofKeyHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
getExpectedProofBytes(String url,
String accessToken,
long timestamp)
Gets the expected proof bytes.
|
static PublicKey |
getPublicKey(String modulus,
String exponent)
Gets the public key.
|
static boolean |
verifyProofKey(PublicKey key,
String proofKeyHeader,
byte[] expectedProofBytes)
Verify proof key.
|
static boolean |
verifyTimestamp(long timestamp)
Checks that the given
timestamp is no more than 20 minutes old. |
public static PublicKey getPublicKey(String modulus, String exponent)
modulus - the modulusexponent - the exponentpublic static byte[] getExpectedProofBytes(String url, String accessToken, long timestamp)
url - the urlaccessToken - the access tokentimestamp - the timestamppublic static boolean verifyProofKey(PublicKey key, String proofKeyHeader, byte[] expectedProofBytes)
key - the keyproofKeyHeader - the proof key headerexpectedProofBytes - the expected proof bytespublic static boolean verifyTimestamp(long timestamp)
timestamp is no more than 20 minutes old.timestamp - the timestampCopyright © 2003–2020 eXo Platform SAS. All rights reserved.