public static class AesCbcWithIntegrity.CipherTextIvMac extends Object
Constructor and Description |
---|
AesCbcWithIntegrity.CipherTextIvMac(byte[] c,
byte[] i,
byte[] h)
Construct a new bundle of ciphertext and IV.
|
AesCbcWithIntegrity.CipherTextIvMac(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(Object obj) |
byte[] |
getCipherText() |
byte[] |
getIv() |
byte[] |
getMac() |
int |
hashCode() |
static byte[] |
ivCipherConcat(byte[] iv,
byte[] cipherText)
Concatinate the IV to the cipherText using array copy.
|
String |
toString()
Encodes this ciphertext, IV, mac as a string.
|
public AesCbcWithIntegrity.CipherTextIvMac(byte[] c, byte[] i, byte[] h)
c
- The ciphertexti
- The IVh
- The macpublic AesCbcWithIntegrity.CipherTextIvMac(String base64IvAndCiphertext)
base64(iv):base64(ciphertext)
.base64IvAndCiphertext
- A string of the format
iv:ciphertext
The IV and ciphertext must each
be base64-encoded.public byte[] getCipherText()
public byte[] getIv()
public byte[] getMac()
public static byte[] ivCipherConcat(byte[] iv, byte[] cipherText)
iv
- The IV to prependcipherText
- the cipherText to appendpublic String toString()
Copyright © 2008–2017 MIL-OSS. All rights reserved.