Class CryptoAES.Integrity
java.lang.Object
org.apache.hadoop.hbase.io.crypto.aes.CryptoAES.Integrity
- Enclosing class:
- CryptoAES
Helper class for providing integrity protection.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate byte[]private intprivate byte[]private intprivate byte[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate intbyteToInt(byte[] seqNum) private byte[]calculateHMAC(byte[] key, byte[] seqNum, byte[] msg, int start, int len) (package private) booleancompareHMAC(byte[] expectedHMAC, byte[] peerSeqNum, byte[] msg, int start, int len) (package private) booleancomparePeerSeqNum(byte[] peerSeqNum) (package private) byte[]getHMAC(byte[] msg, int start, int len) (package private) byte[](package private) void(package private) voidprivate voidintToByte(int num)
-
Field Details
-
mySeqNum
-
peerSeqNum
-
seqNum
-
myKey
-
peerKey
-
-
Constructor Details
-
Integrity
Integrity(byte[] outKey, byte[] inKey) throws IOException - Throws:
IOException
-
-
Method Details
-
getHMAC
- Throws:
SaslException
-
compareHMAC
boolean compareHMAC(byte[] expectedHMAC, byte[] peerSeqNum, byte[] msg, int start, int len) throws SaslException - Throws:
SaslException
-
comparePeerSeqNum
-
getSeqNum
byte[] getSeqNum() -
incMySeqNum
void incMySeqNum() -
incPeerSeqNum
void incPeerSeqNum() -
calculateHMAC
private byte[] calculateHMAC(byte[] key, byte[] seqNum, byte[] msg, int start, int len) throws SaslException - Throws:
SaslException
-
intToByte
-
byteToInt
-