public ProcessBlock ( byte input, int inOff, byte output, int outOff ) : int | ||
input | byte | |
inOff | int | |
output | byte | |
outOff | int | |
리턴 | int |
public static long CheckBCRijndael () { CheckFirstCall (); long after, before = GC.GetTotalMemory (true); IBlockCipher cipher = new CbcBlockCipher(new AesFastEngine ()); cipher.Init(true, new ParametersWithIV(new KeyParameter(_key), _iv)); cipher.ProcessBlock (_input, 0, _output, 0); after = GC.GetTotalMemory (true); cipher.ProcessBlock (_input, 0, _output, 0); return after - before; }
private void encryptBlock(byte[] key, byte[] iv, byte[] cekBlock) { IBlockCipher engine = new CbcBlockCipher(new DesEngine()); engine.Init(true, new ParametersWithIV(new KeyParameter(key), iv)); for (int i = 0; i < cekBlock.Length; i += 8) { engine.ProcessBlock(cekBlock, i, cekBlock, i); } for (int i = 0; i < cekBlock.Length; i += 8) { engine.ProcessBlock(cekBlock, i, cekBlock, i); } }