String encode(String msg)
msg: The String to encode
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