diff --git a/doc/api/crypto.md b/doc/api/crypto.md index 67c4f8c165b6b9..19e46b89ac83a8 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -3665,7 +3665,7 @@ const { generateKey, } = await import('node:crypto'); -generateKey('hmac', { length: 64 }, (err, key) => { +generateKey('hmac', { length: 512 }, (err, key) => { if (err) throw err; console.log(key.export().toString('hex')); // 46e..........620 }); @@ -3676,7 +3676,7 @@ const { generateKey, } = require('node:crypto'); -generateKey('hmac', { length: 64 }, (err, key) => { +generateKey('hmac', { length: 512 }, (err, key) => { if (err) throw err; console.log(key.export().toString('hex')); // 46e..........620 }); @@ -3939,7 +3939,7 @@ const { generateKeySync, } = await import('node:crypto'); -const key = generateKeySync('hmac', { length: 64 }); +const key = generateKeySync('hmac', { length: 512 }); console.log(key.export().toString('hex')); // e89..........41e ``` @@ -3948,7 +3948,7 @@ const { generateKeySync, } = require('node:crypto'); -const key = generateKeySync('hmac', { length: 64 }); +const key = generateKeySync('hmac', { length: 512 }); console.log(key.export().toString('hex')); // e89..........41e ```