Lines Matching refs:rsa
163 RSA* rsa = NULL; in Encrypt() local
176 rsa = PEM_read_bio_RSAPublicKey(bio, &rsa, NULL, NULL); in Encrypt()
180 rsa = pkey? EVP_PKEY_get1_RSA(pkey) : NULL; in Encrypt()
183 if (rsa == NULL) { in Encrypt()
187 int rsa_len = RSA_size(rsa); in Encrypt()
190 …rypt(data.size(), (unsigned char*)data.data(), (unsigned char*)enc.data(), rsa, RSA_PKCS1_PADDING)… in Encrypt()
204 if (rsa) { in Encrypt()
205 RSA_free(rsa); in Encrypt()
213 RSA* rsa = NULL; in Decrypt() local
226 rsa = PEM_read_bio_RSAPrivateKey(bio, &rsa, NULL, NULL); in Decrypt()
230 rsa = pkey ? EVP_PKEY_get1_RSA(pkey) : NULL; in Decrypt()
233 if (rsa == NULL) { in Decrypt()
237 int rsa_len = RSA_size(rsa); in Decrypt()
240 …_decrypt(rsa_len, (unsigned char*)data.data(), (unsigned char*)dec.data(), rsa, RSA_PKCS1_PADDING); in Decrypt()
253 if (rsa) { in Decrypt()
254 RSA_free(rsa); in Decrypt()