From cfc1914c15665bf20ee3a5a0c3cfa16e2d22c1f6 Mon Sep 17 00:00:00 2001 From: PatStLouis Date: Tue, 17 Dec 2024 18:04:13 +0000 Subject: [PATCH] base64 encode the digestSRI values Signed-off-by: PatStLouis --- tests/5-advanced-concepts.js | 4 ++-- tests/fixtures.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/5-advanced-concepts.js b/tests/5-advanced-concepts.js index a599532..06554c3 100644 --- a/tests/5-advanced-concepts.js +++ b/tests/5-advanced-concepts.js @@ -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.'); diff --git a/tests/fixtures.js b/tests/fixtures.js index 9cc21d4..5549438 100644 --- a/tests/fixtures.js +++ b/tests/fixtures.js @@ -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', };