diff options
| -rw-r--r-- | 04.md | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -23,7 +23,7 @@ import crypto from 'crypto' | |||
| 23 | import * as secp from 'noble-secp256k1' | 23 | import * as secp from 'noble-secp256k1' |
| 24 | 24 | ||
| 25 | let sharedPoint = secp.getSharedSecret(ourPrivateKey, '02' + theirPublicKey) | 25 | let sharedPoint = secp.getSharedSecret(ourPrivateKey, '02' + theirPublicKey) |
| 26 | let sharedX = sharedPoint.substr(2, 64) | 26 | let sharedX = sharedPoint.slice(2, 67) |
| 27 | 27 | ||
| 28 | let iv = crypto.randomFillSync(new Uint8Array(16)) | 28 | let iv = crypto.randomFillSync(new Uint8Array(16)) |
| 29 | var cipher = crypto.createCipheriv( | 29 | var cipher = crypto.createCipheriv( |