public static void encrypt(OutputStream out, byte[] src, int offset, int length, Encryptor e)
    throws IOException {
    OutputStream cout = e.createEncryptionStream(out);
    try {
      cout.write(src, offset, length);
    } finally {
      cout.close();
    }
  }
Encrypt a block of plaintext
<p>
The encryptor's state will be finalized. It should be reinitialized or returned to the pool.
@param out ciphertext
@param src plaintext
hbase-common/src/main/java/org/apache/hadoop/hbase/io/crypto/Encryption.java