Generates a random key to be used in the encryption of the channel. If the language cryptographic randomness primitives are blocking or async, a callback is used. The callback returns a generated binary key.
Optional
keyLength: number
The length of the key, in bits, to be generated. If not specified, this is equal to the default keyLength
of the default algorithm: for AES this is 256 bits.
A promise which, upon success, will be fulfilled with the generated key as a binary, for example, a byte array. Upon failure, the promise will be rejected with an ErrorInfo object which explains the error.
Returns a CipherParams object, using the default values for any fields not supplied by the CipherParamOptions object.
A CipherParamOptions object.
A CipherParams object, using the default values for any fields not supplied.
Generated using TypeDoc
Contains the properties required to configure the encryption of Message payloads.