This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Define the signing key in base64 | |
var kSigningB64 = CryptoEncoding.hexToBase64(attSigningKey); | |
System.log("The signing key in base64 is: " + kSigningB64); | |
// Define the string to sign in base 64 | |
var stringToSignB64 = CryptoEncoding.base64Encode(attStringToSign); | |
System.log("The string to sign in base64 is: " + stringToSignB64); | |
// Calculate the signature | |
var signature = CryptoDigest.hmacSha256(kSigningB64, stringToSignB64); | |
attSignature = CryptoEncoding.base64toHex(signature); | |
System.log("The signature is: " + attSignature); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment