Lines Matching refs:dec_buf
611 uint8_t *dec_buf = NULL; in test_rsa_pub_enc() local
634 dec_buf = (uint8_t *)malloc(nbytes); in test_rsa_pub_enc()
635 if (!dec_buf) { in test_rsa_pub_enc()
657 res = openssl_decrypt(enc_buf, out_len, dec_buf, &out_len, in test_rsa_pub_enc()
664 if (out_len != data_len || memcmp(data, dec_buf, data_len)) { in test_rsa_pub_enc()
666 test_dump_hex("result", dec_buf, out_len); in test_rsa_pub_enc()
680 res = rk_rsa_priv_decrypt(&priv_key, padding, enc_buf, out_len, dec_buf, &out_len); in test_rsa_pub_enc()
686 if (data_len != out_len || memcmp(dec_buf, data, data_len)) { in test_rsa_pub_enc()
701 if (dec_buf) in test_rsa_pub_enc()
702 free(dec_buf); in test_rsa_pub_enc()
723 uint8_t *dec_buf = NULL; in test_rsa_priv_enc() local
746 dec_buf = (uint8_t *)malloc(nbytes); in test_rsa_priv_enc()
747 if (!dec_buf) { in test_rsa_priv_enc()
764 res = rk_rsa_pub_decrypt(&pub_key, padding, enc_buf, out_len, dec_buf, &out_len); in test_rsa_priv_enc()
770 if (data_len != out_len || memcmp(dec_buf, data, data_len)) { in test_rsa_priv_enc()
785 if (dec_buf) in test_rsa_priv_enc()
786 free(dec_buf); in test_rsa_priv_enc()