digest.hmac_sha512_base64

STRINGdigest.hmac_sha512_base64STRINGkeySTRINGinput

Available inall subroutines.

Hash-based message authentication code using SHA-512. Returns a Base64-encoded string.

Example

declare local var.hmac_sha512_base64 STRING;
set var.hmac_sha512_base64 = digest.hmac_sha512_base64("key", "input");
# var.hmac_sha512_base64 is now "A613yBfzJmnMzzjayRXU5VoWgzscpoWXmp31IaBSNZeAkAQ8PaQC2tNl7TmsBa9IZKgERRhh9LTfdoCDTG1PlQ=="

Try it out

digest.hmac_sha512_base64 is used in the following code examples. Examples apply VCL to real-world use cases and can be deployed as they are, or adapted for your own service. See the full list of code examples for more inspiration.

Click RUN on a sample below to provision a Fastly service, execute the code on Fastly, and see how the function behaves.

Authenticate JSON Web Tokens at the edge

Decode the popular JWT format to verify user session tokens before forwarding trusted authentication data to your origin.

User contributed notes

BETA

Do you see an error in this page? Do you have an interesting use case, example or edge case people should know about? Share your knowledge and help people who are reading this page! (Comments are moderated; for support, please contact Fastly support)