Lines Matching refs:dec_buf
128 uint8_t *dec_buf = NULL; in demo_rsa_pub_enc() local
148 dec_buf = (uint8_t *)malloc(nbytes); in demo_rsa_pub_enc()
149 if (!dec_buf) { 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()
173 if (sizeof(plain) != out_len || memcmp(dec_buf, plain, out_len)) { in demo_rsa_pub_enc()
183 if (dec_buf) in demo_rsa_pub_enc()
184 free(dec_buf); in demo_rsa_pub_enc()
203 uint8_t *dec_buf = NULL; in demo_rsa_priv_enc() local
224 dec_buf = (uint8_t *)malloc(nbytes); in demo_rsa_priv_enc()
225 if (!dec_buf) { 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()
249 if (sizeof(plain) != out_len || memcmp(dec_buf, plain, out_len)) { in demo_rsa_priv_enc()
259 if (dec_buf) in demo_rsa_priv_enc()
260 free(dec_buf); in demo_rsa_priv_enc()