Skip to content

Global Helpers

deobfuscateParam()

deobfuscateParam() — returns string

Available in: controller, model, test, migrator, migration, tabledefinition Category: Miscellaneous Functions

Converts an obfuscated string back into its original value. This is typically used when IDs or other sensitive data are encoded for security purposes and need to be restored to their original form.

NameTypeRequiredDefaultDescription
paramstringyesThe value to deobfuscate.
Example 1: Deobfuscate a single value
<cfscript>
// Assume "b7ab9a50" is an obfuscated ID
originalValue = deobfuscateParam("b7ab9a50");

writeOutput("Original value: #originalValue#");
</cfscript>

Converts the obfuscated string "b7ab9a50" back to its original value.

Useful for safely passing IDs in URLs or forms while preventing direct exposure of database keys.

Example 2: Deobfuscate a request parameter
<cfscript>
// Assume params.userId contains an obfuscated user ID
userId = deobfuscateParam(params.userId);

user = model("user").findByKey(userId);
writeDump(user);
</cfscript>

Safely retrieves a user using an obfuscated ID passed in a URL or form.