public static class AesCbcWithIntegrity.CipherTextIvMac
extends java.lang.Object
Constructor and Description |
---|
CipherTextIvMac(byte[] c,
byte[] i,
byte[] h)
Construct a new bundle of ciphertext and IV.
|
CipherTextIvMac(java.lang.String base64IvAndCiphertext)
Constructs a new bundle of ciphertext and IV from a string of the
format
base64(iv):base64(ciphertext) . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
byte[] |
getCipherText()
Get cipher text byte [ ].
|
byte[] |
getIv()
Get iv byte [ ].
|
byte[] |
getMac()
Get mac byte [ ].
|
int |
hashCode() |
static byte[] |
ivCipherConcat(byte[] iv,
byte[] cipherText)
Concatinate the IV to the cipherText using array copy.
|
java.lang.String |
toString()
Encodes this ciphertext, IV, mac as a string.
|
public CipherTextIvMac(byte[] c, byte[] i, byte[] h)
c
- The ciphertexti
- The IVh
- The macpublic CipherTextIvMac(java.lang.String base64IvAndCiphertext)
base64(iv):base64(ciphertext)
.base64IvAndCiphertext
- A string of the format iv:ciphertext
The IV and ciphertext must each be
base64-encoded.public static byte[] ivCipherConcat(byte[] iv, byte[] cipherText)
iv
- The IV to prependcipherText
- the cipherText to appendpublic byte[] getCipherText()
public byte[] getIv()
public byte[] getMac()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object