Skip to content

Commit 5aaa331

Browse files
committed
Further comment funcs to ensure correct suite is known.
1 parent 89c8065 commit 5aaa331

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

tests/suites/proxies.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ export function unsafeProxy(suite) {
7070
});
7171
}
7272

73+
//ecdsa-rdfc-2019 proxy
7374
export function invalidHashProxy({
7475
suiteName,
7576
keyType,
@@ -123,15 +124,15 @@ export function invalidHashProxy({
123124
return suite;
124125
}
125126

126-
// concat 2 unit8Arrays together
127+
// ecdsa-rdfc-2019 concat 2 unit8Arrays together
127128
function _concat(b1, b2) {
128129
const rval = new Uint8Array(b1.length + b2.length);
129130
rval.set(b1, 0);
130131
rval.set(b2, b1.length);
131132
return rval;
132133
}
133134

134-
// sha hashing function
135+
// ecdsa-rdfc-2019 sha hashing function
135136
export async function sha({algorithm, string}) {
136137
return new Uint8Array(crypto.createHash(algorithm).update(string).digest());
137138
}

tests/suites/stubs.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const CBOR_PREFIX_DERIVED = new Uint8Array([0xd9, 0x5d, 0x01]);
2121
const TAGS = [];
2222
TAGS[64] = bytes => bytes;
2323

24+
// Stubs the ecdsa-sd-2023 derive function
2425
export async function stubDerive({
2526
cryptosuite, document, proofSet,
2627
documentLoader, dataIntegrityProof
@@ -76,6 +77,7 @@ function invalidSerializeDisclosureProofValue({
7677
return `u${base64url.encode(cbor)}`;
7778
}
7879

80+
// ecdsa-sd-2023 derive helper
7981
async function _createDisclosureData({
8082
cryptosuite, document, proof, documentLoader
8183
}) {

0 commit comments

Comments
 (0)