nrfxlib API 0.1.0
Loading...
Searching...
No Matches

◆ ocrypto_rsa_oaep_sha256_check_padding()

int ocrypto_rsa_oaep_sha256_check_padding ( uint8_t *  m,
size_t  m_len,
uint8_t *  em,
size_t  em_len,
const uint8_t *  label,
size_t  l_len 
)

#include <crypto/nrf_oberon/include/ocrypto_rsa_padding.h>

RSA OAEP SHA256 unpadding.

Parameters
[out]mThe unpadded message. The buffer must be long enough to hold the message.
m_lenLength of m.
emThe padded message.
em_lenLength of em.
labelThe label associated with the message.
l_lenLength of label. May be 0.
Return values
-1If decryption failed.
-2If the output buffer is too short (m_len < length of message).
nIf a message of length n was successfully decrypted.