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.
Optional
callback: StandardCallback<unknown>
A function which, upon success, will be called with the generated key as a binary, for example, a byte array. Upon failure, the function will be called with information about the error.
Returns a CipherParams object, using the default values for any fields not supplied by the CipherParamOptions object.
A CipherParams object, using the default values for any fields not supplied.
A CipherParamOptions object.
Generated using TypeDoc
Contains the properties required to configure the encryption of Message payloads.