Package COSE

Class Recipient


  • public class Recipient
    extends Message
    Author:
    jimsch
    • Constructor Detail

      • Recipient

        public Recipient()
    • Method Detail

      • DecodeFromCBORObject

        public void DecodeFromCBORObject​(com.upokecenter.cbor.CBORObject objRecipient)
                                  throws CoseException
        Description copied from class: Message
        Given a CBOR tree, parse the message. This is an abstract function that is implemented for each different supported COSE message.
        Specified by:
        DecodeFromCBORObject in class Message
        Parameters:
        objRecipient - CBORObject to be converted to a message.
        Throws:
        CoseException - Internal COSE Exception
      • EncodeCBORObject

        protected com.upokecenter.cbor.CBORObject EncodeCBORObject()
                                                            throws CoseException
        Description copied from class: Message
        Encode the COSE message object to a CBORObject tree. This function call will force cryptographic operations to be executed as needed. This is an internal function, as such it does not add the tag on the front and is implemented on a per message object.
        Specified by:
        EncodeCBORObject in class Message
        Returns:
        CBORObject representing the message.
        Throws:
        CoseException - Internal COSE Exception
      • addRecipient

        public void addRecipient​(Recipient recipient)
      • getRecipient

        public Recipient getRecipient​(int iRecipient)
      • getRecipientCount

        public int getRecipientCount()
      • SetKey

        @Deprecated
        public void SetKey​(com.upokecenter.cbor.CBORObject key)
                    throws CoseException
        Deprecated.
        In COSE 0.9.1, use SetKey(OneKey)
        Set the key for encrypting/decrypting the recipient key.
        Parameters:
        key - private key for encrypting or decrypting
        Throws:
        CoseException - Internal COSE package error.
      • SetKey

        public void SetKey​(OneKey key)
        Set the key for encrypting/decrypting the recipient key.
        Parameters:
        key - private key for encrypting or decrypting
      • SetSenderKey

        public void SetSenderKey​(OneKey key)