Skip to content

Commit

Permalink
fix: RSA fixes for suite
Browse files Browse the repository at this point in the history
  • Loading branch information
nklomp committed Jan 14, 2023
1 parent d6f57b8 commit b163872
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class SphereonJsonWebSignature2020 extends SphereonLdSignature {
}
const headerString = encodeJoseBlob(header)
const messageBuffer = u8a.concat([u8a.fromString(`${headerString}.`, 'utf-8'), args.data])
const messageString = u8a.toString(messageBuffer, 'base64')
const messageString = u8a.toString(messageBuffer, 'utf-8')
const signature = await context.agent.keyManagerSign({
keyRef: key.kid,
algorithm: alg,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ export class JsonWebSignature {
hash: 'SHA-256',
},
key,
typeof proof.jws === 'string' ? u8a.fromString(proof.jws, 'base64urlpad') : proof.jws,
typeof proof.jws === 'string' ? u8a.fromString(proof.jws, 'base64url') : proof.jws,
verifyData
)
}
Expand Down

0 comments on commit b163872

Please sign in to comment.