boolean compareHMAC(byte[] expectedHMAC, byte[] peerSeqNum, byte[] msg, int start, int len)
      throws SaslException {
      byte[] mac = calculateHMAC(peerKey, peerSeqNum, msg, start, len);
      return Arrays.equals(mac, expectedHMAC);
    }
Helper class for providing integrity protection.
hbase-common/src/main/java/org/apache/hadoop/hbase/io/crypto/aes/CryptoAES.java