public static void incrementIv(byte[] iv, int v) {
    // v should be > 0
    int length = iv.length;
    int sum = 0;
    for (int i = 0; i < length; i++) {
      if (v <= 0) {
        break;
      }
      sum = v + (iv[i] & 0xFF);
      v = sum / 256;
      iv[i] = (byte) (sum % 256);
    }
  }
Decrypts a block of ciphertext with the symmetric key resolved for the given subject
@param out     plaintext
@param in      ciphertext
@param outLen  the expected plaintext length
@param subject the subject's key alias
@param conf    configuration
@param cipher  the encryption algorithm
@param iv      the initialization vector, can be null
hbase-common/src/main/java/org/apache/hadoop/hbase/io/crypto/Encryption.java