Hashing
You can create a hash of some text using thehash helper.
encoding option supplied to the helper.
Supported encoding values are hex and base64.
The algorithm option determines the hashing algorithm that will be applied to the input text.
Supported algorithm values are:
sha-1sha-224sha-256sha-384sha-512sha3-224sha3-256sha3-384sha3-512md2md5
Examples
SHA-256 hex encoding:119e3f0d28cf6a92d29399d5787f90308b6b87670d8c2386ec42cb36e293b5c4
MD5 base64 encoding:
J3A5Rbm86ssJVG0uEDrTYA==
Signing
You can digitally sign data using the sign helper. This uses the RSA private keyconfigured in your certificate settings to create an
SHA-256 with RSA signature.
hex and
base64.
The sign helper supports both inline and block forms:
Inline form:
Examples
Sign a string literal with default Base64 encoding:X.509 Certificate
You can output the X.509 certificate configured in your certificate settings using thex509Certificate helper. This is useful when building signed documents like SAML
responses that need to include the signing certificate.
pem
(default) and base64.
Examples
Output the certificate in PEM format (default):MIIBkTCB+wIGAZO...
This is useful when embedding the certificate inside an XML document such as a SAML
response, where PEM headers are not required:
Base64 Inflate
You can decode a Base64-encoded, DEFLATE-compressed string in a single operation using thebase64Inflate helper. This is primarily designed for decoding SAML requests that
have been compressed and encoded according to the SAML HTTP-Redirect binding
specification.