public static void encrypt(OutputStream out, InputStream in, Context context, byte[] iv)
    throws IOException {
    Encryptor e = context.getCipher().getEncryptor();
    e.setKey(context.getKey());
    e.setIv(iv); // can be null
    e.reset();
    encrypt(out, in, e);
  }
Encrypt a stream of plaintext given a context and IV
@param out ciphertext
@param in  plaintet
hbase-common/src/main/java/org/apache/hadoop/hbase/io/crypto/Encryption.java