decentralized-identity / did-jwt

Create and verify DID verifiable JWT's in Javascript
Apache License 2.0
331 stars 70 forks source link

feat: interpret publicKeyMultibase as multicodec #298

Closed mirceanis closed 11 months ago

mirceanis commented 11 months ago

fixes #297

Some users of publicKeyMultibase actually encode a multicodec prefixed byte array. This leads to keys that are not decoded properly and thus are not usable for verification.

This fix includes some heuristics to try to decode multibase directly if it fits known public key lengths and then attempt multicodec decoding.

This PR also exports the methods used for key conversions for use in other libraries.

uport-automation-bot commented 11 months ago

:tada: This PR is included in version 7.4.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: