CCloud Releases
Home
Following

Cloud Releases

Service catalogues and updates come from each provider's public product listing and announcements.

Explore

  • Home
  • Latest updates
  • Following

About

  • About
  • Contact
  • Privacy Policy
  • Terms of Use

Providers

  • Amazon Web Services
  • Microsoft Azure
  • Google Cloud
  • Cloudflare

Not affiliated with any cloud provider. Product names and logos belong to their owners.

  1. Providers
  2. ›Cloudflare
  3. ›Rules
  4. ›Update

Feature•Jan 22, 2026

New cryptographic functions — encode_base64() and sha256()

RulesCloudflare · Core platform

Cloudflare Rulesets now includes encode_base64() and sha256() functions, enabling you to generate signed request headers directly in rule expressions. These functions support common patterns like constructing a canonical string from request attributes, computing a SHA256 digest, and Base64-encoding the result.

New functions

Function · Description · Availability

encode_base64(input, flags) · Encodes a string to Base64 format. Optional flags parameter: u for URL-safe encoding, p for padding (adds = characters to make the output length a multiple of 4, as required by some systems). By default, output is standard Base64 without padding. · All plans (in header transform rules)

sha256(input) · Computes a SHA256 hash of the input string. · Requires enablement

Note

The sha256() function is available as an Enterprise add-on and requires a specific entitlement. Contact your account team to enable it.

Examples

Encode a string to Base64 format:

encode_base64("hello world")

Returns: aGVsbG8gd29ybGQ

Encode a string to Base64 format with padding:

encode_base64("hello world", "p")

Returns: aGVsbG8gd29ybGQ=

Perform a URL-safe Base64 encoding of a string:

encode_base64("hello world", "u")

Returns: aGVsbG8gd29ybGQ

Compute the SHA256 hash of a secret token:

sha256("my-token")

Returns a hash that your origin can validate to authenticate requests.

Compute the SHA256 hash of a string and encode the result to Base64 format:

encode_base64(sha256("my-token"))

Combines hashing and encoding for systems that expect Base64-encoded signatures.

For more information, refer to the Functions reference.

Read the original announcement↗

More from Rules

All Rules updates →
  1. Failed detections field available in Rules

    You can now use cf.appsec.request.failed_detections to control how your rules handle requests when a security detection reports a failure.

    Rules•Feature•Oct 9, 2026
  2. hash_in_range() is globally available for HTTP products

    hash_in_range() is globally available for HTTP products on all plans. It hashes fields into an integer within a specified range. Use this result to select a portion of requests.

    Rules•Feature•Oct 2, 2026
  3. Handle missing values with coalesce()

    The coalesce() function returns the first argument that is not nil. Use it to provide a fallback in rule expressions:

    Rules•Feature•Oct 1, 2026
  4. Compare dynamic values in Rules expressions

    Cloudflare Rules expressions now support dynamic values on both sides of equality and ordering comparisons. You can compare request fields or function results with one another.

    Rules•Feature•Oct 1, 2026
  5. concat() now supports up to 32 arguments

    The concat() function in Cloudflare Rules now accepts up to 32 arguments, increased from 16. This allows you to build richer dynamic values directly in Rules expressions and simplify configurations that combine request data.

    Rules•Feature•Sep 22, 2026