Cloudflare Rules supports three new hash functions: sha1(), md5(), and sha512(). Use them to compute hashes for systems that require these algorithms.
Like the existing sha256() function, each accepts a string or byte array and returns raw bytes:
| Function | Algorithm | Output length |
|---|---|---|
md5() |
MD5 | 16 bytes |
sha1() |
SHA-1 | 20 bytes |
sha512() |
SHA-512 | 64 bytes |
For example, combine sha512() with encode_base64() to produce a Base64-encoded hash:
encode_base64(sha512("hello world"))
For details, refer to the sha1(), md5(), and sha512() function references.
Source: Cloudflare


