digest.hmac_sha512

STRINGdigest.hmac_sha512STRINGkeySTRINGinput

Available in all subroutines.

Hash-based message authentication code using SHA-512. Returns a hex-encoded string prepended with 0x.

Example

declare local var.hmac_sha512 STRING;
set var.hmac_sha512 = digest.hmac_sha512("key", "input");
# var.hmac_sha512 is now "0x03ad77c817f32669cccf38dac915d4e55a16833b1ca685979a9df521a05235978090043c3da402dad365ed39ac05af4864a804451861f4b4df7680834c6d4f95"

Try it out

digest.hmac_sha512 is used in the following solution recipes, which show real world use cases. Click RUN to provision a Fastly service, execute the code on Fastly, and see how the function behaves.

Waiting room

A totally stateless solution to hold back new users for a minimum waiting period to smooth out spikes in traffic.

User contributed notes

We welcome comments that add use cases, ideas, tips, and caveats. All comments will be moderated before publication. To post support questions, visit our support center and we'll find you the help you need.