예제 #1
0
 // this takes a buffer of information and fills the block
 private void processFilledBuffer(byte[] in, int inOff) {
   // copies into the block...
   for (int i = 0; i < _state.length; i++) {
     _block[i] = bytesToLongFromBuffer(_buffer, i * 8);
   }
   processBlock();
   _bufferPos = 0;
   Arrays.fill(_buffer, (byte) 0);
 }
예제 #2
0
 /** reset the chaining variables */
 public void reset() {
   // set variables to null, blank, whatever
   _bufferPos = 0;
   Arrays.fill(_bitCount, (short) 0);
   Arrays.fill(_buffer, (byte) 0);
   Arrays.fill(_hash, 0);
   Arrays.fill(_K, 0);
   Arrays.fill(_L, 0);
   Arrays.fill(_block, 0);
   Arrays.fill(_state, 0);
 }