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; }
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; }
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); } }
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); }
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; }
public void update(byte in) { if (bufOff == buf.length) { cipher.processBlock(buf, 0, mac, 0); bufOff = 0; } buf[bufOff++] = in; }
public int doFinal(byte[] input, int inputOffset, int inputLength, byte[] output, int outputOffset) { int blockSize = cipher.getBlockSize(); for (int i = 0; i < inputLength; i += blockSize) { cipher.processBlock(input, inputOffset + i, output, outputOffset + i); } return inputLength; }
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 long skip(long numberOfBytes) { adjustCounter(numberOfBytes); checkCounter(); cipher.processBlock(counter, 0, counterOut, 0); return numberOfBytes; }
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); }
/** Encripta un bloque usando AES. * @param key Clave AES. * @param z Bloque a crifrar. * @return Bloque cifrado. */ public static byte[] encryptBlock(final byte[] key, final byte[] z) { final byte[] s = new byte[BLOCK_SIZE]; final KeyParameter encKey = new KeyParameter(key); final BlockCipher cipher = new AESEngine(); cipher.init(true, encKey); cipher.processBlock(z, 0, s, 0); return s; }
protected void updateHASH(byte[] LSub) { xor(OffsetHASH, LSub); xor(hashBlock, OffsetHASH); hashCipher.processBlock(hashBlock, 0, hashBlock, 0); xor(Sum, hashBlock); }
private void CalculateMac(byte[] authText, int authOff, int len) { int totalLen = len; while (totalLen > 0) { for (int byteIndex = 0; byteIndex < engine.getBlockSize(); byteIndex++) { macBlock[byteIndex] ^= authText[authOff + byteIndex]; } engine.processBlock(macBlock, 0, macBlock, 0); totalLen -= engine.getBlockSize(); authOff += engine.getBlockSize(); } }
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(); }