berendsliedrecht/sd-jwt-ts

Library should assume default hashing algorithm of sha-256

TimoGlastra opened this issue · 1 comments

The spec describes that if no _sd_alg property is present at the top-level, a default value of sha-256 MUST be used.

So I think we need to tweak the checkHasher method to use this as value to compare against the algorithm.

If the _sd_alg claim is not present at the top level, a default value of sha-256 MUST be used.

https://datatracker.ietf.org/doc/html/draft-ietf-oauth-selective-disclosure-jwt-06#name-hash-function-claim

Might also be nice to add a sdAlg getter on the Sd JWt to get the property value, or the default if not defined