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
Modifier and TypeFieldDescriptionprivate byte[]
private int
private byte[]
private int
private byte[]
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate int
byteToInt
(byte[] seqNum) private byte[]
calculateHMAC
(byte[] key, byte[] seqNum, byte[] msg, int start, int len) (package private) boolean
compareHMAC
(byte[] expectedHMAC, byte[] peerSeqNum, byte[] msg, int start, int len) (package private) boolean
comparePeerSeqNum
(byte[] peerSeqNum) (package private) byte[]
getHMAC
(byte[] msg, int start, int len) (package private) byte[]
(package private) void
(package private) void
private void
intToByte
(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
-