diff options
| author | Jonathan Staab <shtaab@gmail.com> | 2023-08-11 13:24:29 -0700 |
|---|---|---|
| committer | Jonathan Staab <shtaab@gmail.com> | 2023-08-11 13:24:29 -0700 |
| commit | 94330ffb10fc60d882e3c03504d0f8fa7aa1a7b3 (patch) | |
| tree | 67bb8840dac59784cb905afc0e022f279de2f581 /44.md | |
| parent | 30696049ccdc9f19b9f737b97290a78d0a64ba9c (diff) | |
Fix typo
Diffstat (limited to '44.md')
| -rw-r--r-- | 44.md | 3 |
1 files changed, 2 insertions, 1 deletions
| @@ -74,8 +74,9 @@ export function encrypt(privkey: string, pubkey: string, text: string, v = 1) { | |||
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | export function decrypt(privkey: string, pubkey: string, payload: string) { | 76 | export function decrypt(privkey: string, pubkey: string, payload: string) { |
| 77 | let data | ||
| 77 | try { | 78 | try { |
| 78 | payload = JSON.parse(payload) as { | 79 | data = JSON.parse(payload) as { |
| 79 | ciphertext: string | 80 | ciphertext: string |
| 80 | nonce: string | 81 | nonce: string |
| 81 | v: number | 82 | v: number |