| Constructor and Description |
|---|
Util() |
| Modifier and Type | Method and Description |
|---|---|
static String |
computeHmacSHA256(String key,
String message)
Computes the HMAC/SHA-256 code for a given key and message.
|
static long |
getTimeNow()
Returns the current UTC timestamp in seconds.
|
static boolean |
secureCompare(String a,
String b)
Compares two strings for equality.
|
public static String computeHmacSHA256(String key, String message) throws UnsupportedEncodingException, NoSuchAlgorithmException, InvalidKeyException
key - the key used to generate the code.message - the message.UnsupportedEncodingExceptionNoSuchAlgorithmExceptionInvalidKeyExceptionpublic static boolean secureCompare(String a, String b)
a - one of the strings to compare.b - the other string to compare.public static long getTimeNow()
Copyright © 2017 Stripe. All rights reserved.