public class EncryptedContent extends Object
| Constructor and Description |
|---|
EncryptedContent()
Create an EncryptedContent where all the values are unspecified.
|
EncryptedContent(EncryptedContent encryptedContent)
Create an EncryptedContent as a deep copy of the given object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Set all the fields to indicate unspecified values.
|
EncryptAlgorithmType |
getAlgorithmType()
Get the algorithm type.
|
Blob |
getInitialVector()
Get the initial vector.
|
KeyLocator |
getKeyLocator()
Get the key locator.
|
Name |
getKeyLocatorName()
Check that the key locator type is KEYNAME and return the key Name.
|
Blob |
getPayload()
Get the payload.
|
Blob |
getPayloadKey()
Get the encrypted payload key.
|
boolean |
hasInitialVector()
Check if the initial vector is specified.
|
EncryptedContent |
setAlgorithmType(EncryptAlgorithmType algorithmType)
Set the algorithm type.
|
EncryptedContent |
setInitialVector(Blob initialVector)
Set the initial vector.
|
EncryptedContent |
setKeyLocator(KeyLocator keyLocator)
Set the key locator.
|
EncryptedContent |
setKeyLocatorName(Name keyName)
Set the key locator type to KeyLocatorType.KEYNAME and set the key Name.
|
EncryptedContent |
setPayload(Blob payload)
Set the encrypted payload.
|
EncryptedContent |
setPayloadKey(Blob payloadKey)
Set the encrypted payload key.
|
void |
wireDecode(Blob input)
Decode the input as an EncryptedContent v1 using the default wire format
and update this EncryptedContent.
|
void |
wireDecode(Blob input,
WireFormat wireFormat)
Decode the input as an EncryptedContent v1 using a particular wire format
and update this EncryptedContent.
|
void |
wireDecode(ByteBuffer input)
Decode the input as an EncryptedContent v1 using the default wire format
and update this EncryptedContent.
|
void |
wireDecode(ByteBuffer input,
WireFormat wireFormat)
Decode the input as an EncryptedContent v1 using a particular wire format
and update this EncryptedContent.
|
void |
wireDecodeV2(Blob input)
Decode the input as an EncryptedContent v2 using the default wire format
and update this EncryptedContent.
|
void |
wireDecodeV2(Blob input,
WireFormat wireFormat)
Decode the input as an EncryptedContent v2 using a particular wire format
and update this EncryptedContent.
|
void |
wireDecodeV2(ByteBuffer input)
Decode the input as an EncryptedContent v2 using the default wire format
and update this EncryptedContent.
|
void |
wireDecodeV2(ByteBuffer input,
WireFormat wireFormat)
Decode the input as an EncryptedContent v2 using a particular wire format
and update this EncryptedContent.
|
Blob |
wireEncode()
Encode this to an EncryptedContent v1 for the default wire format.
|
Blob |
wireEncode(WireFormat wireFormat)
Encode this to an EncryptedContent v1 wire encoding.
|
Blob |
wireEncodeV2()
Encode this to an EncryptedContent v2 for the default wire format.
|
Blob |
wireEncodeV2(WireFormat wireFormat)
Encode this to an EncryptedContent v2 wire encoding.
|
public EncryptedContent()
public EncryptedContent(EncryptedContent encryptedContent)
encryptedContent - The other encryptedContent to copy.public final EncryptAlgorithmType getAlgorithmType()
public final KeyLocator getKeyLocator()
public final Name getKeyLocatorName()
Error - if the key locator type is not KEYNAME.public final boolean hasInitialVector()
public final Blob getInitialVector()
public final Blob getPayload()
public final Blob getPayloadKey()
public final EncryptedContent setAlgorithmType(EncryptAlgorithmType algorithmType)
algorithmType - The algorithm type. If not specified, set to
EncryptAlgorithmType.NONE.public final EncryptedContent setKeyLocator(KeyLocator keyLocator)
keyLocator - The key locator. This makes a copy of the object. If not
specified, set to the default KeyLocator().public final EncryptedContent setKeyLocatorName(Name keyName)
keyName - The key locator Name, which is copied.public final EncryptedContent setInitialVector(Blob initialVector)
initialVector - The initial vector. If not specified, set to the
default Blob() where isNull() is true.public final EncryptedContent setPayload(Blob payload)
payload - The payload. If not specified, set to the default Blob()
where isNull() is true.public final EncryptedContent setPayloadKey(Blob payloadKey)
payloadKey - The encrypted payload key. If not specified, set to the
default Blob() where isNull() is true.public final void clear()
public final Blob wireEncode(WireFormat wireFormat)
wireFormat - A WireFormat object used to encode this EncryptedContent.public final Blob wireEncode()
public final Blob wireEncodeV2(WireFormat wireFormat)
wireFormat - A WireFormat object used to encode this EncryptedContent.public final Blob wireEncodeV2()
public final void wireDecode(ByteBuffer input, WireFormat wireFormat) throws EncodingException
input - The input buffer to decode. This reads from position() to
limit(), but does not change the position.wireFormat - A WireFormat object used to decode the input.EncodingException - For invalid encoding.public final void wireDecode(ByteBuffer input) throws EncodingException
input - The input buffer to decode. This reads from position() to
limit(), but does not change the position.EncodingException - For invalid encoding.public final void wireDecode(Blob input, WireFormat wireFormat) throws EncodingException
input - The input blob to decode.wireFormat - A WireFormat object used to decode the input.EncodingException - For invalid encoding.public final void wireDecode(Blob input) throws EncodingException
input - The input blob to decode.EncodingException - For invalid encoding.public final void wireDecodeV2(ByteBuffer input, WireFormat wireFormat) throws EncodingException
input - The input buffer to decode. This reads from position() to
limit(), but does not change the position.wireFormat - A WireFormat object used to decode the input.EncodingException - For invalid encoding.public final void wireDecodeV2(ByteBuffer input) throws EncodingException
input - The input buffer to decode. This reads from position() to
limit(), but does not change the position.EncodingException - For invalid encoding.public final void wireDecodeV2(Blob input, WireFormat wireFormat) throws EncodingException
input - The input blob to decode.wireFormat - A WireFormat object used to decode the input.EncodingException - For invalid encoding.public final void wireDecodeV2(Blob input) throws EncodingException
input - The input blob to decode.EncodingException - For invalid encoding.Copyright © 2019. All rights reserved.