• Home
  • Raw
  • Download

Lines Matching full:hex

103   const inputEncoding = test.plainIsHex ? 'hex' : 'ascii';
114 Buffer.from(test.key, 'hex'),
115 Buffer.from(test.iv, 'hex'),
119 encrypt.setAAD(Buffer.from(test.aad, 'hex'), aadOptions);
121 let hex = encrypt.update(test.plain, inputEncoding, 'hex'); variable
122 hex += encrypt.final('hex');
127 assert.strictEqual(hex, test.ct);
128 assert.strictEqual(auth_tag.toString('hex'), test.tag);
136 Buffer.from(test.key, 'hex'),
137 Buffer.from(test.iv, 'hex'),
142 Buffer.from(test.key, 'hex'),
143 Buffer.from(test.iv, 'hex'),
145 decrypt.setAuthTag(Buffer.from(test.tag, 'hex'));
147 decrypt.setAAD(Buffer.from(test.aad, 'hex'), aadOptions);
149 const outputEncoding = test.plainIsHex ? 'hex' : 'ascii';
151 let msg = decrypt.update(test.ct, 'hex', outputEncoding);
157 assert.throws(function() { decrypt.final('hex'); }, errMessages.auth);
169 encrypt.setAAD(Buffer.from(test.aad, 'hex'), aadOptions);
170 let hex = encrypt.update(test.plain, 'ascii', 'hex');
171 hex += encrypt.final('hex');
175 assert.strictEqual(hex, test.ct);
176 assert.strictEqual(auth_tag.toString('hex'), test.tag);
187 decrypt.setAuthTag(Buffer.from(test.tag, 'hex'));
189 decrypt.setAAD(Buffer.from(test.aad, 'hex'), aadOptions);
190 let msg = decrypt.update(test.ct, 'hex', 'ascii');
204 Buffer.from(test.key, 'hex'),
205 Buffer.from(test.iv, 'hex'),
216 Buffer.from(test.key, 'hex'),
286 cipher.update('01234567', 'hex');
289 assert.strictEqual(tag.toString('hex'), fullTag.substr(0, 2 * e));
310 decipher.setAuthTag(Buffer.from('445352d3ff85cf94', 'hex'));
312 decipher.update('3a2a3647', 'hex'),
452 cipher.setAAD(Buffer.from('0123456789', 'hex'), { plaintextLength });
502 cipher.setAAD(Buffer.from('0123456789', 'hex'));
513 cipher.setAAD(Buffer.from('0123456789', 'hex'));
521 const key = Buffer.from('1ed2233fa2223ef5d7df08546049406c', 'hex');
522 const iv = Buffer.from('7305220bca40d4c90e1791e9', 'hex');
523 const ct = Buffer.from('8beba09d4d4d861f957d51c0794f4abf8030848e', 'hex');
528 // decrypt.setAuthTag(Buffer.from('0d9bcd142a94caf3d1dd', 'hex'));
530 decrypt.setAAD(Buffer.from('63616c76696e', 'hex'), {
541 const key = Buffer.from('1ed2233fa2223ef5d7df08546049406c', 'hex');
542 const iv = Buffer.from('579d9dfde9cd93d743da1ceaeebb86e4', 'hex');
544 decrypt.setAAD(Buffer.from('0123456789', 'hex'));
545 decrypt.setAuthTag(Buffer.from('1bb9253e250b8069cde97151d7ef32d9', 'hex'));
546 assert.strictEqual(decrypt.update('807022', 'hex', 'hex'), 'abcdef');
547 assert.strictEqual(decrypt.final('hex'), '');
553 const iv = Buffer.from('112233445566778899aabb', 'hex');
659 Buffer.from(valid.key, 'hex'),
660 Buffer.from(H(prefix) + valid.iv, 'hex'),