GeneratePBKDFKey
Generates an encoded encryption key using the specified algorithm and key size
Method Signature
GeneratePBKDFKey(algorithm=[string], passphrase=[string], salt=[string], iterations=[numeric], keySize=[numeric])Arguments
algorithm
string
true
The algorithm to use for generating the key. Algorithms supported are: PBKDF2WithHmacSHA1, PBKDF2WithHmacSHA224, PBKDF2WithHmacSHA256, PBKDF2WithHmacSHA384, PBKDF2WithHmacSHA512
AES
passphrase
string
true
The passphrase to use for generating the key. This is
salt
string
true
The salt to use for generating the key. This is a random string
iterations
numeric
false
The number of iterations to use for generating the key.
keySize
numeric
false
The optional size of the key to generate. If not provided the default key size for the algorithm will be used
Examples
Example PBKDF2 With HMAC SHA1
The PBKDF2WithHmacSHA1 algorithm will work on older JVMs, or older versions of CF
generatePBKDFKey( "PBKDF2WithHmacSHA1", "secret", "salty", 5000, 128 );
Result: Y0MCpCe3zb0CNJvyXNUWEQ==
More complex encryption example
Additional Examples
Related
Last updated
Was this helpful?
