generate3DesKey

Returns a Base64-encoded key for the Triple DES (DESede) algorithm, built from a seed string. The result is the same as toBase64(string), so the seed must be 16 or 24 bytes long to give a valid key; other lengths fail in encrypt() with "Wrong key size". Use generateSecretKey("DESede") for a random key.

generate3DesKey(string) → returns string

Argument Reference

string string
Required

The seed string used to build the key. Lucee does not accept string as a named argument; it uses input.

Compatibility

ColdFusion:

Version 7+ Undocumented until CF11 and missing from getFunctionList() until CF2021, but present since CF7.

Examples
Sample code invoking the generate3DesKey function

generate3DesKey("abcdefghijklmnopqrstuvwx")

Expected Result: YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub