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.
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.