public class Recipient extends Message
emitContent, emitTag, messageTag, rgbContentDO_NOT_SEND, DontSendAttributes, externalData, objDontSend, objProtected, objUnprotected, PROTECTED, ProtectedAttributes, rgbProtected, UNPROTECTED, UnprotectedAttributes| Constructor and Description |
|---|
Recipient() |
| Modifier and Type | Method and Description |
|---|---|
void |
addRecipient(Recipient recipient) |
void |
DecodeFromCBORObject(com.upokecenter.cbor.CBORObject objRecipient)
Given a CBOR tree, parse the message.
|
byte[] |
decrypt(AlgorithmID algCEK,
Recipient recip) |
protected com.upokecenter.cbor.CBORObject |
EncodeCBORObject()
Encode the COSE message object to a CBORObject tree.
|
void |
encrypt() |
byte[] |
getKey(AlgorithmID algCEK) |
Recipient |
getRecipient(int iRecipient) |
int |
getRecipientCount() |
List<Recipient> |
getRecipientList() |
int |
getRecipientType() |
void |
SetKey(com.upokecenter.cbor.CBORObject key)
Deprecated.
In COSE 0.9.1, use SetKey(OneKey)
|
void |
SetKey(OneKey key)
Set the key for encrypting/decrypting the recipient key.
|
void |
SetSenderKey(com.upokecenter.cbor.CBORObject key)
Deprecated.
|
void |
SetSenderKey(OneKey key) |
DecodeFromBytes, 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 void DecodeFromCBORObject(com.upokecenter.cbor.CBORObject objRecipient)
throws CoseException
MessageDecodeFromCBORObject in class MessageobjRecipient - CBORObject to be converted to a message.CoseExceptionprotected com.upokecenter.cbor.CBORObject EncodeCBORObject()
throws CoseException
MessageEncodeCBORObject in class MessageCoseExceptionpublic byte[] decrypt(AlgorithmID algCEK, Recipient recip) throws CoseException, org.bouncycastle.crypto.InvalidCipherTextException
CoseExceptionorg.bouncycastle.crypto.InvalidCipherTextExceptionpublic void encrypt()
throws CoseException,
Exception
CoseExceptionExceptionpublic void addRecipient(Recipient recipient)
public Recipient getRecipient(int iRecipient)
public int getRecipientCount()
public int getRecipientType()
throws CoseException
CoseExceptionpublic byte[] getKey(AlgorithmID algCEK) throws CoseException, Exception
CoseExceptionException@Deprecated public void SetKey(com.upokecenter.cbor.CBORObject key) throws CoseException
key - private key for encrypting or decryptingCoseException - Internal COSE package error.public void SetKey(OneKey key)
key - private key for encrypting or decrypting@Deprecated public void SetSenderKey(com.upokecenter.cbor.CBORObject key) throws CoseException
CoseExceptionpublic void SetSenderKey(OneKey key)
COSE for Java documentation, generatedin 2016.