Updated: October 28, 2024 |
Decrypt a cipher
#include <qcrypto/qcrypto.h>
int qcrypto_cipher_decrypt(qcrypto_ctx_t *ctx, const uint8_t *in, size_t insize, uint8_t *out, size_t *outsize)
This function decrypts ciphertext data using the specified symmetric key. For stream ciphers (block size == 1), the out buffer should be at least as large as the in buffer. If the input is a multiple of the block size (block size > 1), the out buffer should be at least as large as the in buffer; otherwise, the out buffer needs to be at least one block larger.
QCRYPTO_R_EOK if successful or qcrypto_errno if an error occurred.