|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--hypercast.Extension | +--hypercast.PayloadExtension | +--hypercast.EncryptedPayloadExtension
This class extens class PayloadExtension and defines an encrypted payload extension. An instance of this class is constructed only when security policy is set to privacy.
Field Summary |
Fields inherited from class hypercast.Extension |
FSM, HEADER_NONE, RAW_DATA, ROUTE_RECORD, SECURITY |
Constructor Summary | |
EncryptedPayloadExtension()
Constructs an empty Extension |
|
EncryptedPayloadExtension(byte[] payload,
boolean isEncrypted,
hypercast.KeyVault kv)
Constructs an EncryptedPayloadExtension header object with all the parameters |
|
EncryptedPayloadExtension(hypercast.EncryptedPayloadExtension e)
Constructs an Extension from an existing one |
Method Summary | |
hypercast.Extension |
Clone()
Return a new EncryptedPayloadExtension extension instance by cloning this extension. |
byte[] |
getPayload()
Returns the payload byte array. |
int |
getSize()
Returns the length of encrypted payload byte array in this extension. |
void |
setMessageKey(java.security.Key messagekey)
Sets the message key which is used to do encryption/decryption of the payload. |
void |
setPayload(byte[] payload)
Sets the plaintext payload in this extension to given byte array. |
byte[] |
toByteArray()
Converts this object to byte array. |
Methods inherited from class hypercast.PayloadExtension |
getExtensionType |
Methods inherited from class hypercast.Extension |
createExtension, createExtension, createExtension, createExtension, createExtension, isValidHeader, toString, typeToString |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public EncryptedPayloadExtension(byte[] payload, boolean isEncrypted, hypercast.KeyVault kv)
payload
- payload byte arrayisEncrypted
- flag indicating the given payload is encrypted or
plaintext payload. True if payload is encrypted, false otherwise.public EncryptedPayloadExtension(hypercast.EncryptedPayloadExtension e)
public EncryptedPayloadExtension()
Method Detail |
public hypercast.Extension Clone()
Clone
in class PayloadExtension
public void setMessageKey(java.security.Key messagekey)
public byte[] toByteArray()
toByteArray
in class PayloadExtension
public int getSize()
getSize
in class PayloadExtension
public byte[] getPayload()
getPayload
in class PayloadExtension
public void setPayload(byte[] payload)
setPayload
in class PayloadExtension
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |