Whatever message this page gives is out now! Go check it out!

Security functions

Last update:
May 18, 2026
Function Description
CanonicalizeCanonicalization is the process of reducing an encoded string down to its simplest form.
DecryptDecrypts a string that is encrypted with the Encrypt function.
DecodeForHTMLDecodes an HTML encoded string.
DecodeFromURLDecodes an encoded HTML URL string.
EncodeForCSSEncodes the input string for use in CSS.
EncodeForDNEncodes the input string for safe output in LDAP Distinguished Names.
EncodeForHTMLEncodes the input string for safe output in the body of an HTML tag.
EncodeForHTMLAttributeEncodes the input string for safe output in the attribute value of an HTML tag.
EncodeForJavaScriptEncodes the input string for use in JavaScript.
EncodeForLDAPEncodes the input string for safe output in LDAP queries.
EncodeForURLEncodes the input string for use in URLs.
EncodeForXMLEncodes the input string for use in an XML.
EncodeForXMLAttributeEncodes a string that can be used as an XML attribute.
EncodeForXPathReturns an encoded string for using with XPath.
DecryptBinaryDecrypts encrypted binary data with the specified key, value, algorithm, salt, and iterations.
EncryptEncrypts a string.
EncryptBinaryEncrypts binary data using a specific algorithm and encoding method.
GeneratePBKDFKeyGenerates a Password-Based Key-Derivation Function (PBKDF) key.
GenerateSecretKeyGenerates a secure random key value for use in the encrypt and decrypt functions.
GenerateSCryptHash It is a salted password hashing mechanism that takes an input and hashes it into a fixed size output.
GenerateBCryptHashIt is a password-hashing cryptographic function that takes an input and hashes it into a fixed size output.
GetAuthUserGets the name of an authenticated user.
GetTempDirectoryGets the path of the directory that CFML uses for temporary files.
GetTempFileCreates a temporary file in a directory whose name starts with (at most) the first three characters of prefix.
GetUserRolesRetrieves the list of roles for the current user.
GetSafeHTMLSanitizes the given input string based on the the rules specified in an antisamy policy file.
HashConverts a string into a fixed length hexadecimal string.
HmacCreates a keyed-hash message authentication code (HMAC), which can be used to verify authenticity and integrity of a message by two parties that share the key.
IsUserInAnyRoleDetermines whether an authenticated user belongs to any role in a list of roles.
IsUserInRoleDetermines whether an authenticated user belongs to the specified role.
IsUserLoggedInDetermines whether a user is logged in.
isSafeHTMLThis function validates for allowed HTML according to the rules specified in the antisamy policy file.
SessionInvalidateClears session scope and makes the current session identifiers no longer valid.
SessionRotateCreates a new session (using new session ids) and copies session scope into this new session, then invalidates the old session.
VerifyClientVerifies whether a request is from a valid client.
VerifyBCryptHashThis function accepts a plain text and hashed value and compares the text with the hashed value.
VerifySCryptHashThis function accepts a plain text and hashed value and compares the text with the hashed value.

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page