CRYPTO_ocb128_new

Allocate and initialise an OCB128_CONTEXT for the given keys and block functions.

Synopsis

Declared in <openssl/modes.h>

OCB128_CONTEXT*
CRYPTO_ocb128_new(
    void* keyenc,
    void* keydec,
    block128_f encrypt,
    block128_f decrypt,
    ocb128_f stream);

Return Value

New context, or NULL on failure; cleanse internals with CRYPTO_ocb128_cleanup().

Parameters

NameDescription
keyencCipher-specific expanded key used for encryption-direction operations.
keydecCipher-specific expanded key used for decryption-direction operations.
encryptBlock-encrypt function for the underlying cipher.
decryptBlock-decrypt function for the underlying cipher.
streamOptional multi-block OCB acceleration callback, or NULL.