Crypto module
This module contains the encryption and decryption wrappers for Kaya's built-in encryption used to secure web applications. Currently this encryption uses AES 256 encryption via the Gcrypt module and libgcrypt
The encryption key used in the built-in encryption is normally contained within the application binary. If you are using this internal key, you must therefore keep the application binary safe from unauthorised reading (just as you would protect a config file containing database passwords). For convenience of administration, application may choose to use an externally provided key with the built-in encryption functions.
Exceptions
- InvalidDecryptionHash - Invalid hash
- InvalidEncryptedData - Invalid encrypted data
- InvalidExternalKey - Invalid external key or Ivec
Functions
- String decode(String msgin) - Decode a String using the AES256 algorithm.
- String encode(String msg) - Encode a String using the AES256 algorithm.
- String secureHash(String pwd) - Generate a secure hash from a String.
- Void setEncryptionIvec([Int] ivec) - Set application Ivec
- Void setEncryptionKey([Int] key) - Set application secret key