digest.hash_md5

STRINGdigest.hash_md5STRINGs

Available inall subroutines.

Returns an MD5 hash for the string s. MD5 is not considered a secure cryptographic hash.

Example

declare local var.hash_md5 STRING;
set var.hash_md5 = digest.hash_md5("123456789");
# var.hash_md5 is now "25f9e794323b453885f5181f1b624d0b"

Try it out

digest.hash_md5 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.

Check validity of inputs using a non-crypto hash

Block or identify syntactically invalid requests at the edge by using a hash function of your choice.

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)