Lines Matching refs:jwe
2 * lws-crypto-jwe
90 struct lws_jwe jwe;
111 lws_jwe_init(&jwe, context);
126 if (lws_gencrypto_jwe_alg_to_definition(p, &jwe.jose.alg)) {
130 if (lws_gencrypto_jwe_enc_to_definition(sp + 1, &jwe.jose.enc_alg)) {
137 if (lws_jws_alloc_element(&jwe.jws.map, LJWS_JOSE,
145 jwe.jws.map.len[LJWS_JOSE] = (uint32_t)lws_snprintf(
146 (char *)jwe.jws.map.buf[LJWS_JOSE], (unsigned int)temp_len,
166 if (lws_jwk_load(&jwe.jwk, p, NULL, NULL)) {
181 jwe.jws.map.buf[LJWE_CTXT] = in;
182 jwe.jws.map.len[LJWE_CTXT] = (uint32_t)n;
189 n = lws_gencrypto_bits_to_bytes(jwe.jose.enc_alg->keybits_fixed);
190 if (lws_jws_randomize_element(context, &jwe.jws.map, LJWE_EKEY,
200 n = lws_jwe_encrypt(&jwe, lws_concat_temp(temp, temp_len),
208 n = lws_jwe_render_flattened(&jwe, compact,
212 n = lws_jwe_render_compact(&jwe, compact,
234 if (lws_jwe_json_parse(&jwe, (uint8_t *)in, n,
246 if (lws_jws_compact_decode(in, n, &jwe.jws.map,
247 &jwe.jws.map_b64,
261 n = lws_jwe_auth_and_decrypt(&jwe,
272 if (write(1, jwe.jws.map.buf[LJWE_CTXT],
273 jwe.jws.map.len[LJWE_CTXT]) < 0) {
283 lws_jwe_destroy(&jwe);