Security Filters

Security Filters

decrypt_aes filter

Returns the unencrypted value of the input string using a shared secret and optional salt. If no salt is provided, a default salt value is used.

decrypt_aes: String secretString salt

Examples

Use the encrypt_aes and decrypt_aes filters to encrypt and decrypt strings using the aes alrorithm.

Encrypt and decrypt strings with aes

Copy
{%- var secret = "my secret string" -%}
{%- var salt = "my salt" -%}

encrypt_aes

{%- var securetext = "I want this to be reasonably secure" | encrypt_aes: secret, salt -%}
{{-securetext}}
EAAAAIhwZI7hYpsYH7BdFMcQB+H31bacn2V1LECVVhc7OLWWgQdK6S641eAt2Rp2JixOvCTO0ArVkXzhIL988jVDL+w=

decrypt_aes

{{securetext | decrypt_aes: secret, salt }}
I want this to be reasonably secure

Related

encrypt_aes filter

Returns the encrypted value of the input string using a shared secret and optional salt. If no salt is provided, a default salt value is used.

encrypt_aes: String secretString salt

Examples

Use the encrypt_aes and decrypt_aes filters to encrypt and decrypt strings using the aes alrorithm.

Encrypt and decrypt strings with aes

Copy
{%- var secret = "my secret string" -%}
{%- var salt = "my salt" -%}

encrypt_aes

{%- var securetext = "I want this to be reasonably secure" | encrypt_aes: secret, salt -%}
{{-securetext}}
EAAAAIhwZI7hYpsYH7BdFMcQB+H31bacn2V1LECVVhc7OLWWgQdK6S641eAt2Rp2JixOvCTO0ArVkXzhIL988jVDL+w=

decrypt_aes

{{securetext | decrypt_aes: secret, salt }}
I want this to be reasonably secure

Related

base64_url_safe_encode filter

Encodes a string to a URL-safe base64 format. The difference between the base64 and URL-safe base64 formats is that the URL-safe format uses - and _ in place of + and /, which can cause problems when used in a URL.

base64_url_safe_encode

Related

{% image_url %}

Resolves the URL for an image with the desired presets and other settings applied.

{{ url }}

Field containing a URL.

{% set_canonical_url %}

Sets the canonical URL for the current page, which is output by default as part of an HTML page's {{ automatic_markup }}.

base64_url_safe_decode filter

Decodes a string from a URL-safe base64 format. The difference between the base64 and URL-safe base64 formats is that the URL-safe format uses - and _ in place of + and /, which can cause problems when used in a URL.

base64_url_safe_decode

Related

{% image_url %}

Resolves the URL for an image with the desired presets and other settings applied.

{{ url }}

Field containing a URL.

{% set_canonical_url %}

Sets the canonical URL for the current page, which is output by default as part of an HTML page's {{ automatic_markup }}.

base64_encode filter

Encodes a string to Base64 format

base64_encode

Related

base64_decode filter

Decodes a string from Base64 format

base64_decode

Related