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
Copy file name to clipboardExpand all lines: README.md
+24-8Lines changed: 24 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ A simple, secure, and fast symmetric encryption library that makes use of [AES-G
7
7
8
8
## Why AES-GCM?
9
9
10
-
AES-GCM is extremely fast on modern CPUs, which have dedicated hardware acceleration ([AES-NI](https://en.wikipedia.org/wiki/AES_instruction_set)), in addition to being highly secure and even quantum-resistant (AES-128-GCM).
10
+
AES-GCM is extremely fast on modern CPUs, which have dedicated hardware acceleration ([AES-NI](https://en.wikipedia.org/wiki/AES_instruction_set)), in addition to being highly secure and even quantum-resistant (AES-256-GCM).
11
11
12
12
## Installation
13
13
@@ -21,12 +21,12 @@ bun add singlecrypt
21
21
22
22
#### `createSymmetricCryptoKey`
23
23
24
-
Creates a symmetric `CryptoKey` object to be used in the following methods. It takes two parameters:
24
+
Creates a symmetric `CryptoKey` object to be used in the following methods. This method also converts your value key to a SHA-256 hash. It takes two parameters:
25
25
26
26
1. A string key to be hashed. A 32-byte random string is recommended.
27
27
2. A `TextEncoder` instance, if you want to reuse it (optional).
28
28
29
-
Returns a `Promise<CryptoKey>`.
29
+
Returns a `Promise<CryptoKey>` containing a SHA-256 hash used to encrypt and decrypt strings.
30
30
31
31
A `TypeError` may be thrown if there are problems with the string key.
0 commit comments