Lines Matching refs:enc_buf
610 uint8_t *enc_buf = NULL; in test_rsa_pub_enc() local
627 enc_buf = (uint8_t *)malloc(nbytes); in test_rsa_pub_enc()
628 if (!enc_buf) { in test_rsa_pub_enc()
644 res = rk_rsa_pub_encrypt(&pub_key, padding, data, data_len, enc_buf, &out_len); in test_rsa_pub_enc()
657 res = openssl_decrypt(enc_buf, out_len, dec_buf, &out_len, in test_rsa_pub_enc()
672 res = openssl_encrypt(data, data_len, enc_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()
688 test_dump_hex("result", enc_buf, out_len); in test_rsa_pub_enc()
698 if (enc_buf) in test_rsa_pub_enc()
699 free(enc_buf); in test_rsa_pub_enc()
722 uint8_t *enc_buf = NULL; in test_rsa_priv_enc() local
739 enc_buf = (uint8_t *)malloc(nbytes); in test_rsa_priv_enc()
740 if (!enc_buf) { in test_rsa_priv_enc()
756 res = rk_rsa_priv_encrypt(&priv_key, padding, data, data_len, enc_buf, &out_len); 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()
772 test_dump_hex("result", enc_buf, out_len); in test_rsa_priv_enc()
782 if (enc_buf) in test_rsa_priv_enc()
783 free(enc_buf); in test_rsa_priv_enc()