You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Computes a hash / checksum of a string or ArrayBuffer using the specified algorithm ("SHA-256" by default).
1504
+
The algorithm must be supported by the [SubtleCrypto API](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest).
1505
+
1506
+
⚠️ This function needs to be called in a secure context (HTTPS) due to the use of the SubtleCrypto API.
1507
+
⚠️ If you use this for cryptography, make sure to use a secure algorithm (under no circumstances use SHA-1) and to [salt](https://en.wikipedia.org/wiki/Salt_(cryptography)) your input data.
1508
+
1509
+
<details><summary><b>Example - click to view</b></summary>
Copy file name to clipboardexpand all lines: lib/DataStoreSerializer.ts
+1-1
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ export type SerializedDataStore = {
27
27
* All methods are at least `protected`, so you can easily extend this class and overwrite them to use a different storage method or to add additional functionality.
28
28
* Remember that you can call `super.methodName()` in the subclass to access the original method.
29
29
*
30
-
* ⚠️ Needs to run in a secure context (HTTPS) due to the use of the Web Crypto API.
30
+
* ⚠️ Needs to run in a secure context (HTTPS) due to the use of the SubtleCrypto API if checksumming is enabled.
0 commit comments