Package com.amazonaws.encryptionsdk
Class ParsedCiphertext
java.lang.Object
com.amazonaws.encryptionsdk.model.CiphertextHeaders
com.amazonaws.encryptionsdk.ParsedCiphertext
Exposes header information of ciphertexts to make it easier to inspect the algorithm, keys, and
encryption context prior to decryption.
Please note that the class does not make defensive copies.
-
Field Summary
Fields inherited from class com.amazonaws.encryptionsdk.model.CiphertextHeaders
NO_MAX_ENCRYPTED_DATA_KEYS
-
Constructor Summary
ConstructorsConstructorDescriptionParsedCiphertext(byte[] ciphertext)
Parsesciphertext
without enforcing a max EDK count.ParsedCiphertext(byte[] ciphertext, int maxEncryptedDataKeys)
Parsesciphertext
. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
Returns the raw ciphertext backing this object.int
The offset at which the first non-header byte inciphertext
is located.Methods inherited from class com.amazonaws.encryptionsdk.model.CiphertextHeaders
deserialize, getContentType, getCryptoAlgoId, getEncryptedKeyBlobCount, getEncryptedKeyBlobs, getEncryptionContext, getEncryptionContextLen, getEncryptionContextMap, getFrameLength, getHeaderNonce, getHeaderTag, getMessageId, getNonceLength, getSuiteData, getType, getVersion, isComplete, serializeAuthenticatedFields, setHeaderNonce, setHeaderTag, setSuiteData, toByteArray
-
Constructor Details
-
ParsedCiphertext
public ParsedCiphertext(byte[] ciphertext, int maxEncryptedDataKeys)Parsesciphertext
. Please note that this does not make a defensive copy ofciphertext
and that any changes made to the backing array will be reflected here as well.- Parameters:
ciphertext
- The ciphertext to parsemaxEncryptedDataKeys
- The maximum number of encrypted data keys to parse. Zero indicates no maximum.
-
ParsedCiphertext
public ParsedCiphertext(byte[] ciphertext)Parsesciphertext
without enforcing a max EDK count. Please note that this does not make a defensive copy ofciphertext
and that any changes made to the backing array will be reflected here as well.
-
-
Method Details
-
getCiphertext
public byte[] getCiphertext()Returns the raw ciphertext backing this object. This is not a defensive copy and so must not be modified by callers. -
getOffset
public int getOffset()The offset at which the first non-header byte inciphertext
is located.
-