public class EncryptMessage extends EncryptCommon
| Modifier and Type | Field and Description |
|---|---|
protected List<Recipient> |
recipientList |
context, rgbEncryptemitContent, emitTag, messageTag, rgbContentDO_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, 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 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
CoseExceptionorg.bouncycastle.crypto.InvalidCipherTextExceptionpublic void encrypt()
throws CoseException,
IllegalStateException,
org.bouncycastle.crypto.InvalidCipherTextException,
Exception
CoseExceptionIllegalStateExceptionorg.bouncycastle.crypto.InvalidCipherTextExceptionExceptionpublic 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
MessageEncodeCBORObject in class MessageCoseExceptionCOSE for Java documentation, generatedin 2016.