Provided by: libkcapi-dev_1.4.0-1ubuntu1_amd64 bug

NAME

       kcapi_pad_iv - realign the IV as necessary for cipher

SYNOPSIS

       int kcapi_pad_iv(struct kcapi_handle * handle, const uint8_t * iv, uint32_t ivlen,
                        uint8_t ** newiv, uint32_t * newivlen);

ARGUMENTS

       handle
           [in] cipher handle

       iv
           [in] current IV buffer

       ivlen
           [in] length of IV buffer

       newiv
           [out] buffer of aligned IV

       newivlen
           [out] length of newly aligned IV

DESCRIPTION

       The function pads the least significant bits of the provided IV up to the block size of
       the cipher with zeros. In case the provided IV is longer than the block size, the least
       significant bits are truncated to the block size.

       The function allocates memory for newiv in case the return code indicates success. The
       consumer must free the memory after use.

       return 0 for success; a negative errno-style error code if an error occurred

AUTHOR

       Stephan Mueller <smueller@chronox.de>
           Author.

COPYRIGHT