Skip to content

Commit

Permalink
fix: signature is base64 url
Browse files Browse the repository at this point in the history
Signed-off-by: Timo Glastra <[email protected]>
  • Loading branch information
TimoGlastra committed Mar 18, 2024
1 parent 42eb16e commit a6f666a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/modules/sd-jwt-vc/SdJwtVcService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,13 +277,13 @@ export class SdJwtVcService {
* @todo validate the JWT header (alg)
*/
private verifier(agentContext: AgentContext, key: Key): Verifier {
return async (message: string, signature: string) => {
return async (message: string, signatureBase64Url: string) => {
if (!key) {
throw new SdJwtVcError('The public key used to verify the signature is missing')
}

return await agentContext.wallet.verify({
signature: Buffer.from(signature),
signature: TypedArrayEncoder.fromBase64(signatureBase64Url),
key,
data: TypedArrayEncoder.fromString(message),
})
Expand Down

0 comments on commit a6f666a

Please sign in to comment.