CRYPTO_ocb128_init

Initialise an existing OCB128_CONTEXT for the given keys and block functions.

Synopsis

Declared in <openssl/modes.h>

int
CRYPTO_ocb128_init(
    OCB128_CONTEXT* ctx,
    void* keyenc,
    void* keydec,
    block128_f encrypt,
    block128_f decrypt,
    ocb128_f stream);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
ctxContext storage to initialise.
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.