Exemplo n.º 1
0
 @Override
 public void write(int b) throws IOException {
   index += blockCipher.processByte((byte) b, buffer, index);
   if (index == buffer.length) {
     flush();
   } else if (index > buffer.length) {
     throw new IllegalStateException(
         "Cipher buffer overflow, "
             + "buffer size must not exceed block size of 32 bytes "
             + "but was "
             + index);
   }
 }