Crypto::setEncryptionIvec(3) Set application Ivec


Void setEncryptionIvec( [Int] ivec )


ivec The new ivec. This must be an array of integers, containing exactly 16 integers between 0 and 255. An Exception will be thrown if the parameter is unsuitable. The ivec is not secret and does not need to be generated in any particular way.


Sets the application Ivec used by Crypto.encode(3kaya) and Crypto.decode(3kaya) 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(3kaya)
 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 standard library by Edwin Brady, Chris Morris and others ([email protected]). For further information see


The Kaya standard library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (version 2.1 or any later version) as published by the Free Software Foundation.