openHiTLS API openHiTLS 0.1.0-Alpha1

◆ CRYPT_DecryptCallback

typedef int32_t(* CRYPT_DecryptCallback) (const HITLS_CipherParameters *cipher, const uint8_t *in, uint32_t inLen, uint8_t *out, uint32_t *outLen)

TLS decryption.

Provides decryption capabilities for records, including the AEAD and CBC algorithms. Decrypt the input factor (key parameter) and ciphertext according to the record protocol to obtain the plaintext.

Parameters
cipher[IN] Key parameters
in[IN] Ciphertext data
inLen[IN] Ciphertext data length
out[OUT] Plaintext data
outLen[IN/OUT] IN: maximum buffer length OUT: plaintext data length
Return values
0indicates success. Other values indicate failure.