Lucee Function Reference

generatesecretkey()

Gets a secure key value for use in the encrypt function.

Example

generatesecretkey(string algorithm,[number keySize]):string

Arguments

The arguments for this function are set. You can not use other arguments except the following ones.
Name Type Required Description
algorithm string  Yes The encryption algorithm used to generate the key.
The available algorithms (depending on your JVM) are:
  • HmacSHA3-224
  • HmacSHA384
  • HmacSHA512/224
  • HmacSHA512
  • HmacSHA512/256
  • HmacSHA3-512
  • HmacSHA3-256
  • HmacSHA3-384
  • HmacSHA224
  • ARCFOUR
  • Blowfish
  • HmacSHA256
  • HmacSHA1
  • AES
  • HmacMD5
  • DESede
  • DES
  • RC2
  • ChaCha20  
  • keySize number  No Number of bits requested in the key for the specified algorithm.