diff options
Diffstat (limited to '44.md')
| -rw-r--r-- | 44.md | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -75,7 +75,7 @@ export function encrypt(privkey: string, pubkey: string, text: string, v = 1) { | |||
| 75 | return base64.encode(payload) | 75 | return base64.encode(payload) |
| 76 | } | 76 | } |
| 77 | 77 | ||
| 78 | export function decrypt(privkey: string, pubkey: string, payload: string) { | 78 | export function decrypt(privkey: string, pubkey: string, blob: string) { |
| 79 | const payload = base64.decode(blob) | 79 | const payload = base64.decode(blob) |
| 80 | if (payload[0] !== 1) { | 80 | if (payload[0] !== 1) { |
| 81 | throw new Error('NIP44: unknown encryption version') | 81 | throw new Error('NIP44: unknown encryption version') |