Skip to content

Commit

Permalink
Update zip closer to its use and remove unnecessary whiteline
Browse files Browse the repository at this point in the history
  • Loading branch information
sarroutbi authored May 20, 2024
1 parent ac295d4 commit e3e5e98
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/jose-jwe-enc
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,8 @@ for msg in "hi" "this is a longer message that is more than one block"; do
# "zip": "DEF"
tmpl='{"kty":"oct","bytes":32}'
for enc in A128CBC-HS256 A192CBC-HS384 A256CBC-HS512 A128GCM A192GCM A256GCM; do
zip="$(printf '{"alg":"A128KW","enc":"%s","zip":"DEF"}' "${enc}")"

jose jwk gen -i "${tmpl}" -o "${jwk}"
zip="$(printf '{"alg":"A128KW","enc":"%s","zip":"DEF"}' "${enc}")"
printf '%s' "${msg}" | jose jwe enc -i "${zip}" -I- -k "${jwk}" -o "${jwe}"
[ "$(jose jwe dec -i "${jwe}" -k "${jwk}" -O-)" = "${msg}" ]
done
Expand Down

0 comments on commit e3e5e98

Please sign in to comment.