test: use valid authentication tag length

Using authentication tags of invalid length does not conform to NIST
standards.

Backport-PR-URL: https://github.com/nodejs/node/pull/18347
PR-URL: https://github.com/nodejs/node/pull/17566
Refs: https://github.com/nodejs/node/issues/17523
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Tobias Nießen authored and Myles Borins committed 2018-02-12 19:28:39 -05:00
1 parent 694828df0e
commit 734ce678f4
1 file changed
+1 -1
+1 -1
View File
@@ -141,7 +141,7 @@ testCipher2(Buffer.from('0123456789abcdef'));
// setAutoPadding/setAuthTag/setAAD should return `this`
{
const key = '0123456789';
const tagbuf = Buffer.from('tagbuf');
const tagbuf = Buffer.from('auth_tag');
const aadbuf = Buffer.from('aadbuf');
const decipher = crypto.createDecipher('aes-256-gcm', key);
assert.strictEqual(decipher.setAutoPadding(), decipher);