pub unsafe extern "C" fn ocrypto_aes_cbc_pkcs_decrypt(
    pt: *mut u8,
    pt_len: *mut usize,
    ct: *const u8,
    ct_len: usize,
    key: *const u8,
    size: usize,
    iv: *const u8
) -> c_int
Expand description

AES-CBC-PKCS7 decryption.

  • pt - Plaintext.
  • pt_len - Plaintext length.
  • ct - Ciphertext.
  • ct_len - Ciphertext length. Must be a multiple of 16.
  • key - AES key.
  • size - Key size (16, 24, or 32).
  • iv - Initial vector.

Returns 0 If the input is properly padded. Returns -1 Otherwise.

@remark * pt - may be same as * ct - . @remark The maximum length of * pt - is * ct_len - - 1.