public class Encrypt0Message extends EncryptCommon
context, rgbEncryptemitContent, emitTag, messageTag, rgbContentDO_NOT_SEND, DontSendAttributes, externalData, objDontSend, objProtected, objUnprotected, PROTECTED, ProtectedAttributes, rgbProtected, UNPROTECTED, UnprotectedAttributes| Constructor and Description |
|---|
Encrypt0Message()
Create a Encrypt0Message object.
|
Encrypt0Message(boolean emitTag,
boolean emitContent)
Create a Encrypt0Message object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
DecodeFromCBORObject(com.upokecenter.cbor.CBORObject obj)
Given a CBOR tree, parse the message.
|
byte[] |
decrypt(byte[] rgbKey)
Decrypt the message using the passed in key.
|
protected com.upokecenter.cbor.CBORObject |
EncodeCBORObject()
Internal function used to construct the CBORObject
|
void |
encrypt(byte[] rgbKey)
Encrypt the message using the passed in key.
|
decryptWithKey, getEncryptedContent, setEncryptedContentDecodeFromBytes, DecodeFromBytes, EncodeToBytes, EncodeToCBORObject, GetContent, HasContent, SetContent, SetContentaddAttribute, addAttribute, addAttribute, AddProtected, AddProtected, AddProtected, AddUnprotected, AddUnprotected, AddUnprotected, findAttribute, findAttribute, findAttribute, findAttribute, getDoNotSendAttributes, getExternal, getProtectedAttributes, getUnprotectedAttributes, removeAttribute, removeAttribute, setExternalpublic Encrypt0Message()
public Encrypt0Message(boolean emitTag,
boolean emitContent)
emitTag - is the leading CBOR tag emittedemitContent - is the content emittedpublic void DecodeFromCBORObject(com.upokecenter.cbor.CBORObject obj)
throws CoseException
MessageDecodeFromCBORObject in class Messageobj - CBORObject to be converted to a message.CoseExceptionprotected com.upokecenter.cbor.CBORObject EncodeCBORObject()
throws CoseException
EncodeCBORObject in class MessageCoseException - if the content has not yet been encryptedpublic byte[] decrypt(byte[] rgbKey)
throws CoseException
rgbKey - key for decryptionCoseExceptionpublic void encrypt(byte[] rgbKey)
throws CoseException,
IllegalStateException
rgbKey - key used for encryptionCoseExceptionIllegalStateExceptionCOSE for Java documentation, generatedin 2018.