Gcrypt module
This module implements an interface to the libgcrypt cryptographic library. It is used by the Crypto library to provide Kaya's application secret key encryption and decryption. As well as cryptographic algorithms, this library also provides several hash algorithms.
Type Synonyms
IVec=[Int]Key=[Int]
Data types
- Gcrypt::Cipher - Available symmetric ciphers
- Gcrypt::CipherFlags - Cipher opening flags
- Gcrypt::CipherHandle - A cipher handle
- Gcrypt::CipherMode - Cipher modes
- Gcrypt::Hash - Hash algorithms
- Gcrypt::HashFlags - Hash opening flags
- Gcrypt::HashHandle - A hash handle
Functions
- [Int] appIVec() - Get the application initialisation vector
- [Int] appKey() - Get the application secret key
- Int cipherBlockLength(Cipher c) - Get the required block length.
- Int cipherKeySize(Cipher c) - Get the required key size.
- Void closeCipher(CipherHandle h) - Close a cipher handle
- Void closeHash(HashHandle h) - Close a hash handle
- Binary decrypt(CipherHandle h,Binary dat) - Decrypt binary data
- String decryptString(CipherHandle h,String x) - Decrypt a string
- Binary encrypt(CipherHandle h,Binary dat) - Encrypt binary data
- String encryptString(CipherHandle h,String x) - Encrypt a string
- Void finalHash(HashHandle h) - Finalise the hash handle
- Binary getHash(HashHandle h) - Get the hash result
- Void hashBinary(HashHandle h,Binary dat) - Hash binary data
- Void hashString(HashHandle h,String str) - Hash string data
- CipherHandle openCipher(Cipher algo,CipherMode mode,[CipherFlags] flags=createArray(1)) - Open a cipher handle
- HashHandle openHash(Hash algo,[HashFlags] flags=createArray(1)) - Open a hash handle
- Void resetHash(HashHandle h) - Reset a hash handle
- Void setCipherIVec(CipherHandle h,IVec key) - Set the cipher initialisation vector
- Void setCipherKey(CipherHandle h,Key key) - Set the cipher secret key