public class EncryptMessage extends EncryptCommon
Modifier and Type | Field and Description |
---|---|
protected List<Recipient> |
recipientList |
context, rgbEncrypt
emitContent, emitTag, messageTag, rgbContent
DO_NOT_SEND, DontSendAttributes, externalData, objDontSend, objProtected, objUnprotected, PROTECTED, ProtectedAttributes, rgbProtected, UNPROTECTED, UnprotectedAttributes
Constructor and Description |
---|
EncryptMessage() |
EncryptMessage(boolean emitTag) |
Modifier and Type | Method and Description |
---|---|
void |
addRecipient(Recipient recipient) |
void |
DecodeFromCBORObject(com.upokecenter.cbor.CBORObject obj)
Given a CBOR tree, parse the message.
|
byte[] |
decrypt(Recipient whom) |
protected com.upokecenter.cbor.CBORObject |
EncodeCBORObject()
Encode the COSE message object to a CBORObject tree.
|
void |
encrypt() |
Recipient |
getRecipient(int iRecipient) |
int |
getRecipientCount() |
List<Recipient> |
getRecipientList() |
decryptWithKey, getEncryptedContent, setEncryptedContent
DecodeFromBytes, DecodeFromBytes, EncodeToBytes, EncodeToCBORObject, GetContent, HasContent, SetContent, SetContent
addAttribute, addAttribute, addAttribute, AddProtected, AddProtected, AddProtected, AddUnprotected, AddUnprotected, AddUnprotected, findAttribute, findAttribute, findAttribute, findAttribute, getDoNotSendAttributes, getExternal, getProtectedAttributes, getUnprotectedAttributes, removeAttribute, removeAttribute, setExternal
public EncryptMessage()
public EncryptMessage(boolean emitTag)
public void addRecipient(Recipient recipient)
public Recipient getRecipient(int iRecipient)
public int getRecipientCount()
public byte[] decrypt(Recipient whom) throws CoseException, org.bouncycastle.crypto.InvalidCipherTextException
CoseException
org.bouncycastle.crypto.InvalidCipherTextException
public void encrypt() throws CoseException, IllegalStateException, org.bouncycastle.crypto.InvalidCipherTextException, Exception
CoseException
IllegalStateException
org.bouncycastle.crypto.InvalidCipherTextException
Exception
public void DecodeFromCBORObject(com.upokecenter.cbor.CBORObject obj) throws CoseException
Message
DecodeFromCBORObject
in class Message
obj
- CBORObject to be converted to a message.CoseException
protected com.upokecenter.cbor.CBORObject EncodeCBORObject() throws CoseException
Message
EncodeCBORObject
in class Message
CoseException
COSE for Java documentation, generatedin 2016.