Lines Matching refs:enc_buf
127 uint8_t *enc_buf = NULL; in demo_rsa_pub_enc() local
141 enc_buf = (uint8_t *)malloc(nbytes); in demo_rsa_pub_enc()
142 if (!enc_buf) { in demo_rsa_pub_enc()
160 res = rk_rsa_pub_encrypt(&pub_key, padding, plain, sizeof(plain), enc_buf, &out_len); in demo_rsa_pub_enc()
167 res = rk_rsa_priv_decrypt(&priv_key, padding, enc_buf, out_len, dec_buf, &out_len); in demo_rsa_pub_enc()
180 if (enc_buf) in demo_rsa_pub_enc()
181 free(enc_buf); in demo_rsa_pub_enc()
202 uint8_t *enc_buf = NULL; in demo_rsa_priv_enc() local
217 enc_buf = (uint8_t *)malloc(nbytes); in demo_rsa_priv_enc()
218 if (!enc_buf) { in demo_rsa_priv_enc()
236 res = rk_rsa_priv_encrypt(&priv_key, padding, plain, sizeof(plain), enc_buf, &out_len); in demo_rsa_priv_enc()
243 res = rk_rsa_pub_decrypt(&pub_key, padding, enc_buf, out_len, dec_buf, &out_len); in demo_rsa_priv_enc()
256 if (enc_buf) in demo_rsa_priv_enc()
257 free(enc_buf); in demo_rsa_priv_enc()