class type cipher =object
..end
method name : string
The name of the cipher
method mode : string
The mode of the cipher
method key_lengths : (int * int) list
Supported key lengths as pairs min,max
. If there is a recommended
key length, this is the first.
method iv_lengths : (int * int) list
Supported iv lengths as pairs min,max
. If there is a recommended
iv length, this is the first.
method block_constraint : int
The buffers used with encrypt/decrypt must have a length that is a multiple of this number. (In ECB mode this is the block size.)
method supports_aead : bool
Whether this cipher integrates authentication
method create : string -> padding -> cipher_ctx
create c p key
: create a new cipher context for key
. If not set,
the initialization vector is assumed to be zero, and the header the
empty string.
The cipher context can be used for either encrypting or decrypting a single message.