Lines Matching refs:iv

36922 function calcIv(self, iv, ck) {
36923 if (iv.length === 12) {
36924 self._finID = Buffer.concat([iv, Buffer.from([0, 0, 0, 1])]);
36925 return Buffer.concat([iv, Buffer.from([0, 0, 0, 2])]);
36929 var len = iv.length;
36931 ghash.update(iv);
36949 function StreamCipher(mode, key, iv, decrypt) {
36957 iv = calcIv(this, iv, ck);
36958 this._prev = Buffer.from(iv);
37063 function Decipher(mode, key, iv) {
37068 this._prev = Buffer.from(iv);
37156 function createDecipheriv(suite, password, iv) {
37159 if (typeof iv === 'string') iv = Buffer.from(iv);
37160 …if (config.mode !== 'GCM' && iv.length !== config.iv) throw new TypeError('invalid iv length ' + i…
37165 return new StreamCipher(config.module, password, iv, true);
37167 return new AuthCipher(config.module, password, iv, true);
37170 return new Decipher(config.module, password, iv);
37176 var keys = ebtk(password, false, config.key, config.iv);
37177 return createDecipheriv(suite, keys.key, keys.iv);
37202 function Cipher(mode, key, iv) {
37206 this._prev = Buffer.from(iv);
37283 function createCipheriv(suite, password, iv) {
37288 if (typeof iv === 'string') iv = Buffer.from(iv);
37289 …if (config.mode !== 'GCM' && iv.length !== config.iv) throw new TypeError('invalid iv length ' + i…
37292 return new StreamCipher(config.module, password, iv);
37294 return new AuthCipher(config.module, password, iv);
37297 return new Cipher(config.module, password, iv);
37303 var keys = ebtk(password, false, config.key, config.iv);
37304 return createCipheriv(suite, keys.key, keys.iv);
37407 function incr32(iv) {
37408 var len = iv.length;
37412 item = iv.readUInt8(len);
37415 iv.writeUInt8(0, len);
37418 iv.writeUInt8(item, len);
37860 function StreamCipher(mode, key, iv, decrypt) {
37863 this._prev = Buffer.from(iv);
37901 ivLen = aesModes[suite].iv;
37904 ivLen = desModes[suite].iv;
37910 return createCipheriv(suite, keys.key, keys.iv);
37919 ivLen = aesModes[suite].iv;
37922 ivLen = desModes[suite].iv;
37928 return createDecipheriv(suite, keys.key, keys.iv);
37931 function createCipheriv(suite, key, iv) {
37933 if (aesModes[suite]) return aes.createCipheriv(suite, key, iv);
37936 iv: iv,
37942 function createDecipheriv(suite, key, iv) {
37944 if (aesModes[suite]) return aes.createDecipheriv(suite, key, iv);
37947 iv: iv,
38010 var iv = opts.iv;
38012 if (!Buffer.isBuffer(iv)) {
38013 iv = Buffer.from(iv);
38018 iv: iv,
38036 iv: 0
38040 iv: 8
38044 iv: 8
38048 iv: 0
38052 iv: 8
38056 iv: 0
44610 function CBCState(iv) {
44611 assert.equal(iv.length, 8, 'Invalid IV length');
44612 this.iv = new Array(8);
44614 for (var i = 0; i < this.iv.length; i++) {
44615 this.iv[i] = iv[i];
44644 var state = new CBCState(this.options.iv);
44651 var iv = state.iv;
44655 iv[i] ^= inp[inOff + i];
44658 superProto._update.call(this, iv, 0, out, outOff);
44661 iv[i] = out[outOff + i];
44667 out[outOff + i] ^= iv[i];
44671 iv[i] = inp[inOff + i];
49093 var iv = Buffer.alloc(ivLen || 0);
49112 var ivStart = iv.length - ivLen;
49114 tmp.copy(iv, ivStart, used, used + length);
49122 iv: iv
70070 var iv = Buffer.from(match[2], 'hex');
70072 var cipherKey = evp(password, iv.slice(0, 8), parseInt(match[1], 10)).key;
70074 var cipher = ciphers.createDecipheriv(suite, cipherKey, iv);
70221 var iv = data.algorithm.decrypt.cipher.iv;
70225 var cipher = ciphers.createDecipheriv(algo, key, iv);