public abstract class EncryptCommon extends Message
| Modifier and Type | Field and Description |
|---|---|
protected String |
context |
protected byte[] |
rgbEncrypt |
emitContent, emitTag, messageTag, rgbContentDontSendAttributes, externalData, objDontSend, objProtected, objUnprotected, ProtectedAttributes, rgbProtected, UnprotectedAttributes| Constructor and Description |
|---|
EncryptCommon() |
| Modifier and Type | Method and Description |
|---|---|
protected byte[] |
decryptWithKey(byte[] rgbKey) |
byte[] |
getEncryptedContent()
Used to obtain the encrypted content for the cases where detached content
is requested.
|
void |
setEncryptedContent(byte[] rgb)
Set the encrypted content for detached content cases.
|
DecodeFromBytes, DecodeFromBytes, DecodeFromCBORObject, EncodeCBORObject, EncodeToBytes, EncodeToCBORObject, GetContent, SetContent, SetContentaddAttribute, addAttribute, addAttribute, AddProtected, AddProtected, AddProtected, AddUnprotected, AddUnprotected, AddUnprotected, findAttribute, findAttribute, setExternalprotected String context
protected byte[] rgbEncrypt
protected byte[] decryptWithKey(byte[] rgbKey)
throws CoseException,
org.bouncycastle.crypto.InvalidCipherTextException
CoseExceptionorg.bouncycastle.crypto.InvalidCipherTextExceptionpublic byte[] getEncryptedContent()
throws CoseException
CoseException - if content has not been encryptedpublic void setEncryptedContent(byte[] rgb)
rgb - encrypted content to be usedCOSE for Java documentation, generatedin 2016.