public int processByte(byte in, byte[] out, int outOff) throws DataLengthException { initCipher(); return process(in, out, outOff); }
public void reset() { reset(true); }
EAXBlockCipher eax = new EAXBlockCipher(engine); Log.e(TAG, "key: " + getKey()); Log.e(TAG, "nonce: " + Utilities.byteArrayToHexString(nonce)); AEADParameters params = new AEADParameters(new KeyParameter(getKey()), mac_len, nonce, null); eax.init(true, params); //TODO switch true to false here to implement a decryption method, apply it to microdumps/megadumps byte[] result = new byte[eax.getOutputSize(plainlength)]; int resultlength = eax.processBytes(plain, 0, plainlength, result, 0); eax.doFinal(result, resultlength);
public int doFinal(byte[] out, int outOff) throws IllegalStateException, InvalidCipherTextException initCipher(); calculateMac(); reset(false); calculateMac(); if (!verifyMac(bufBlock, extra - macSize)) reset(false);
calculateMac(); reset(false); calculateMac(); if (!verifyMac(bufBlock, extra - macSize)) reset(false);
cipher = new AEADGenericBlockCipher(new EAXBlockCipher(baseEngine));
public int processByte(byte in, byte[] out, int outOff) throws DataLengthException { return process(in, out, outOff); }
EAXBlockCipher eax = new EAXBlockCipher(engine); Log.e(TAG, "key: " + getKey()); Log.e(TAG, "nonce: " + Utilities.byteArrayToHexString(nonce)); AEADParameters params = new AEADParameters(new KeyParameter(getKey()), mac_len, nonce, null); eax.init(false, params); //TODO switch true to false here to implement a decryption method, apply it to microdumps/megadumps byte[] result = new byte[eax.getOutputSize(plainlength)]; int resultlength = eax.processBytes(plain, 0, plainlength, result, 0);
cipher = new AEADGenericBlockCipher(new EAXBlockCipher(baseEngine));
public int processBytes(byte[] in, int inOff, int len, byte[] out, int outOff) throws DataLengthException { int resultLen = 0; for (int i = 0; i != len; i++) { resultLen += process(in[inOff + i], out, outOff + resultLen); } return resultLen; }
cipher = new AEADGenericBlockCipher(new EAXBlockCipher(baseEngine));
public int processBytes(byte[] in, int inOff, int len, byte[] out, int outOff) throws DataLengthException { initCipher(); if (in.length < (inOff + len)) { throw new DataLengthException("Input buffer too short"); } int resultLen = 0; for (int i = 0; i != len; i++) { resultLen += process(in[inOff + i], out, outOff + resultLen); } return resultLen; }
public void reset() { reset(true); }