Encryption in Liquid expressions
This reference provides the sample filters for encryption in Liquid expressions.
rsa_encrypt
Encrypt with RSA.
Parameters: data, action[‘encrypt’, ‘decrypt’], key
rsa_decrypt
Decrypt with RSA.
Parameters: input, private key
symmetric_encrypt
Encrypt/Decrypt with the specified symmetric algorithm.
Parameters: input, action[‘encrypt’, ‘decrypt’], mode, key, iv = nil, no_padding[‘true’, ‘false’]
aes_decrypt
Decrypt with AES.
Parameters: input, decryption_IV, decryption key, mode[‘AES-128-CBC’, ‘AES-256-CBC’]
jwt_encode/jwt_decode
Encode/Decode JWT with the specified algorithm.
Parameters for encoding: payload, key, algorithm
Parameters for decoding: token, key, verify
hmac_sha256_sign/hmac_sha512_sign
Use HMAC-SHA256/HMAC-SHA512 to sign a string.
Parameters: input, key
rsa_random_key
Create a random key with the specified algorithm.
Parameters: nil, mode