public static void encrypt(OutputStream out, byte[] src, int offset, int length, 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, src, offset, length, e);
  }
Encrypt a block of plaintext
@param out ciphertext
@param src plaintext
hbase-common/src/main/java/org/apache/hadoop/hbase/io/crypto/Encryption.java