Skip to content

Commit 43177ba

Browse files
authored
Update search-utilities.tsx
1 parent ed4f066 commit 43177ba

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/archive-apis/search-utilities.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,8 @@ async function processInChunks<T>(
493493
}
494494
}
495495

496-
async function ComputeSha256Hash(message) {
496+
// Implementation extractd from MDN https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest#basic_example
497+
async function computeSha256Hash(message) {
497498
const msgUint8 = new TextEncoder().encode(message); // encode string to Uint8Array
498499
const hashBuffer = await window.crypto.subtle.digest("SHA-256", msgUint8); // hash
499500
const hashArray = Array.from(new Uint8Array(hashBuffer)); // buffer -> byte array
@@ -513,7 +514,7 @@ export {
513514
maxAbs,
514515
getConstellationName,
515516
getSatellitesRespectingGsd,
516-
ComputeSha256Hash,
517+
computeSha256Hash,
517518

518519
// Enums
519520
Satellites,

0 commit comments

Comments
 (0)