Kaya 0.5.2 reference for Crypto::setEncryptionIvec

List of functions and data types in Crypto

Void setEncryptionIvec([Int] ivec)

Arguments

Usage

Sets the application Ivec used by encode and decode to a new value for the remainder of program execution. You can obtain the key from a variety of sources (e.g. a flat file, or a database entry) - the easiest way is probably to read 16 bytes from a file with IO::getChar. The Ivec is not secret, but in some cases you may need it to be consistent.

Web applications should call this function from within their webconfig function to avoid unpredictable results. Also to avoid unpredictable results, this function may only be called once per program run, and must be called before any other function that uses the key. An Exception will be thrown if this is called for a second time or too late.

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