private void decrypt(CipherState state,ByteBuffer inByteBuffer,ByteBuffer outByteBuffer,byte padding) throws IOException {
  Utils.checkState(inByteBuffer.position() >= padding);
  if (inByteBuffer.position() == padding) {
    return;
  }
  inByteBuffer.flip();
  outByteBuffer.clear();
  decryptBuffer(state,inByteBuffer,outByteBuffer);
  inByteBuffer.clear();
  outByteBuffer.flip();
  if (padding > 0) {
    outByteBuffer.position(padding);
  }
}

private void decrypt ( CipherState state , ByteBuffer inByteBuffer , ByteBuffer outByteBuffer , byte padding ) throws IOException { Utils . checkState ( inByteBuffer . position ( ) >= padding ) ; if ( inByteBuffer . position ( ) == padding ) { return ; } inByteBuffer . flip ( ) ; outByteBuffer . clear ( ) ; decryptBuffer ( state , inByteBuffer , outByteBuffer ) ; inByteBuffer . clear ( ) ; outByteBuffer . flip ( ) ; if ( padding > 0 ) { outByteBuffer . position ( padding ) ; } }
does the decryption using inbuffer as input and outbuffer as output . upon return , inbuffer is cleared ; the decrypted data starts at outbuffer . position ( ) and ends at outbuffer . limit ( ) .
