Skip to content

Commit

Permalink
base64 encode the digestSRI values
Browse files Browse the repository at this point in the history
Signed-off-by: PatStLouis <[email protected]>
  • Loading branch information
PatStLouis authored and BigBlueHat committed Dec 17, 2024
1 parent bd58f96 commit cfc1914
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/5-advanced-concepts.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ describe('Advanced Concepts', function() {
// Wrong digestSRI negative test
negativeFixture.relatedResource = [{
id: relatedResource.id,
digestSRI: 'sha256-' +
'3384605907374540ed8c909281326d4dfbe967b48f120fcb34ed044a5a2f402d'
digestSRI: 'sha384-' +
'_rCVIV7fSXXTNIvpiq26jRDyj8JG8TDjij-tD0ewLk4JpnXEz6a5AeeY_1qQ0d0P'
}];
await assert.rejects(endpoints.issue(negativeFixture),
'Failed to reject a VC with a relatedResource with wrong digest.');
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ export const envelopedPresentation = {
export const relatedResource = {
id: 'https://www.w3.org/ns/credentials/v2',
mediaType: 'application/ld+json',
digestSRI: 'sha256-24a18c90e9856d526111f29376e302d970b2bd10182e33959995b0207d7043b9',
digestSRI: 'sha384-NSOcNpmdIVUxIJGvGUoe22FjTWrXiaXlsZ8q6912LdnR3KraQO2n75Ica4wK4Qeg',
digestMultibase: 'uJKGMkOmFbVJhEfKTduMC2XCyvRAYLjOVmZWwIH1wQ7k',
};

0 comments on commit cfc1914

Please sign in to comment.