Kaya 0.5.2 reference for Crypto::encode

List of functions and data types in Crypto

String encode(String msg)

Arguments

Usage

Encode a String using the AES256 algorithm. The value is encoded with the application's secret key, which is compiled in automatically (unless overridden with setEncryptionKey). The return value is base64 encoded and also includes a hash which will be verified when the String is decoded. The value will only be decodable by the Kaya application that encoded it, provided that the application secret key is not revealed.

You must therefore ensure no-one has read access to the application key (whether this is in the Kaya binary or an external source) if you need to rely on the integrity of the data (for example, in CGI or webapps). Should you suspect the key is compromised, you can change an internal key by recompiling the binary, or using the kaya-rekey utility.

Related

kaya@kayalang.org | Last modified 29 November 2011 | Supported by Durham CompSoc | Powered by Kaya