nrfxlib API 2.7.99
Loading...
Searching...
No Matches

◆ ocrypto_rsa_pkcs1_v15_check_padding()

int ocrypto_rsa_pkcs1_v15_check_padding ( uint8_t *  m,
size_t  m_len,
const uint8_t *  em,
size_t  em_len 
)

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

RSA PKCS1 V1.5 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.
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.