Lines Matching refs:hmacctx
35 struct lws_genhmac_ctx hmacctx; in lws_jwe_encrypt_cbc_hs() local
119 if (lws_genhmac_init(&hmacctx, jwe->jose.enc_alg->hmac_type, in lws_jwe_encrypt_cbc_hs()
137 if (lws_genhmac_update(&hmacctx, aad, aad_len) || in lws_jwe_encrypt_cbc_hs()
138 lws_genhmac_update(&hmacctx, jwe->jws.map.buf[LJWE_IV], in lws_jwe_encrypt_cbc_hs()
141 lws_genhmac_update(&hmacctx, in lws_jwe_encrypt_cbc_hs()
144 lws_genhmac_update(&hmacctx, al, 8)) { in lws_jwe_encrypt_cbc_hs()
146 lws_genhmac_destroy(&hmacctx, NULL); in lws_jwe_encrypt_cbc_hs()
150 if (lws_genhmac_destroy(&hmacctx, digest)) { in lws_jwe_encrypt_cbc_hs()
168 struct lws_genhmac_ctx hmacctx; in lws_jwe_auth_and_decrypt_cbc_hs() local
203 if (lws_genhmac_init(&hmacctx, jwe->jose.enc_alg->hmac_type, enc_cek, in lws_jwe_auth_and_decrypt_cbc_hs()
209 if (lws_genhmac_update(&hmacctx, aad, aad_len) || in lws_jwe_auth_and_decrypt_cbc_hs()
210 lws_genhmac_update(&hmacctx, (uint8_t *)jwe->jws.map.buf[LJWE_IV], in lws_jwe_auth_and_decrypt_cbc_hs()
212 lws_genhmac_update(&hmacctx, (uint8_t *)jwe->jws.map.buf[LJWE_CTXT], in lws_jwe_auth_and_decrypt_cbc_hs()
214 lws_genhmac_update(&hmacctx, al, 8)) { in lws_jwe_auth_and_decrypt_cbc_hs()
216 lws_genhmac_destroy(&hmacctx, NULL); in lws_jwe_auth_and_decrypt_cbc_hs()
220 if (lws_genhmac_destroy(&hmacctx, digest)) { in lws_jwe_auth_and_decrypt_cbc_hs()