diff --git a/04.md b/04.md index bafc5c7..153456a 100644 --- a/04.md +++ b/04.md @@ -23,7 +23,7 @@ import crypto from 'crypto' import * as secp from 'noble-secp256k1' let sharedPoint = secp.getSharedSecret(ourPrivateKey, '02' + theirPublicKey) -let sharedX = sharedPoint.substr(2, 64) +let sharedX = sharedPoint.slice(2, 67) let iv = crypto.randomFillSync(new Uint8Array(16)) var cipher = crypto.createCipheriv(