public void update(byte in) { if (bufOff == buf.length) { cipher.processBlock(buf, 0, mac, 0); bufOff = 0; } buf[bufOff++] = in; }
public void update( byte in) { if (bufOff == buf.length) { cipher.processBlock(buf, 0, mac, 0); bufOff = 0; } buf[bufOff++] = in; }
void getMacBlock( byte[] mac) { cipher.processBlock(cfbV, 0, mac, 0); } }
private void process(byte[] res, byte[] a, byte[] b) { for (int i = 0; i != res.length; i++) { res[i] = (byte)(a[i] ^ b[i]); } engine.processBlock(res, 0, res, 0); }
void getMacBlock( byte[] mac) { cipher.processBlock(cfbV, 0, mac, 0); } }
public void update( byte in) { if (bufOff == buf.length) { cipher.processBlock(buf, 0, mac, 0); bufOff = 0; } buf[bufOff++] = in; }
private void process(byte[] res, byte[] a, byte[] b) { for (int i = 0; i != res.length; i++) { res[i] = (byte)(a[i] ^ b[i]); } engine.processBlock(res, 0, res, 0); }
public void update( byte in) { if (bufOff == buf.length) { cipher.processBlock(buf, 0, mac, 0); bufOff = 0; } buf[bufOff++] = in; }
private byte[] generateBuf() { byte[] encryptedCTR = new byte[CTR.length]; cipher.processBlock(CTR, 0, encryptedCTR, 0); return GOST3413CipherUtil.MSB(encryptedCTR, s); }
public long skip(long numberOfBytes) { adjustCounter(numberOfBytes); cipher.processBlock(counter, 0, counterOut, 0); return numberOfBytes; }
private void ProcessBlock(byte[] input, int inOff, int len, byte[] output, int outOff) { for (int byteIndex = 0; byteIndex < counter.length; byteIndex++) { s[byteIndex] += counter[byteIndex]; } engine.processBlock(s, 0, buffer, 0); for (int byteIndex = 0; byteIndex < engine.getBlockSize(); byteIndex++) { output[outOff + byteIndex] = (byte)(buffer[byteIndex] ^ input[inOff + byteIndex]); } }
public void reset() { if (initialised) { engine.processBlock(this.iv, 0, ofbV, 0); } engine.reset(); byteCount = 0; }
/** * creating gamma value * * @return gamma */ byte[] createGamma() { byte[] msb = GOST3413CipherUtil.MSB(R, blockSize); byte[] encryptedMsb = new byte[msb.length]; cipher.processBlock(msb, 0, encryptedMsb, 0); return GOST3413CipherUtil.MSB(encryptedMsb, s); }
int doProcessBlock(byte[] in, int inOff, byte[] out, int outOff, byte[] tweakValue) throws DataLengthException, IllegalStateException { merge(in, inOff, out, outOff, tweakValue); cipher.processBlock(out, outOff, out, outOff); merge(out, outOff, out, outOff, tweakValue); return BLOCK_SIZE; }
private void E(byte[] key, byte[] s, int sOff, byte[] in, int inOff) { cipher.init(true, new KeyParameter(key)); cipher.processBlock(in, inOff, s, sOff); }
private void E(byte[] key, byte[] s, int sOff, byte[] in, int inOff) { cipher.init(true, new KeyParameter(key)); cipher.processBlock(in, inOff, s, sOff); }
@Override public byte[] apply(int blockOffset) { byte[] lfsr = lfsr(blockOffset); byte[] out = new byte[cipher.getBlockSize()]; cipher.processBlock(lfsr, 0, out, 0); return out; }
public long skip(long numberOfBytes) { adjustCounter(numberOfBytes); checkCounter(); cipher.processBlock(counter, 0, counterOut, 0); return numberOfBytes; }
protected void updateHASH(byte[] LSub) { xor(OffsetHASH, LSub); xor(hashBlock, OffsetHASH); hashCipher.processBlock(hashBlock, 0, hashBlock, 0); xor(Sum, hashBlock); }
public void init(CipherParameters params) { validate(params); cipher.init(true, params); //initializes the L, Lu, Lu2 numbers byte[] L = new byte[ZEROES.length]; cipher.processBlock(ZEROES, 0, L, 0); Lu = doubleLu(L); Lu2 = doubleLu(Lu); reset(); }