Package COSE
Class MAC0Message
- java.lang.Object
-
- COSE.Attribute
-
- COSE.Message
-
- COSE.MacCommon
-
- COSE.MAC0Message
-
public class MAC0Message extends MacCommon
- Author:
- jimsch
-
-
Field Summary
-
Fields inherited from class COSE.MacCommon
random, rgbTag, strContext
-
Fields inherited from class COSE.Message
emitContent, emitTag, messageTag, rgbContent
-
Fields inherited from class COSE.Attribute
DO_NOT_SEND, DontSendAttributes, externalData, objDontSend, objProtected, objUnprotected, PROTECTED, ProtectedAttributes, rgbProtected, UNPROTECTED, UnprotectedAttributes
-
-
Constructor Summary
Constructors Constructor Description MAC0Message()
-
Method Summary
Modifier and Type Method Description voidCreate(byte[] rgbKey)voidDecodeFromCBORObject(com.upokecenter.cbor.CBORObject obj)Given a CBOR tree, parse the message.protected com.upokecenter.cbor.CBORObjectEncodeCBORObject()Encode the COSE message object to a CBORObject tree.booleanValidate(byte[] rgbKey)-
Methods inherited from class COSE.MacCommon
AES_CBC_MAC, CreateWithKey
-
Methods inherited from class COSE.Message
addCountersignature, DecodeFromBytes, DecodeFromBytes, EncodeToBytes, EncodeToCBORObject, GetContent, getCountersign1, getCountersignerList, HasContent, ProcessCounterSignatures, SetContent, SetContent, setCountersign1, validate, validate
-
Methods inherited from class COSE.Attribute
addAttribute, addAttribute, addAttribute, AddProtected, AddProtected, AddProtected, AddUnprotected, AddUnprotected, AddUnprotected, findAttribute, findAttribute, findAttribute, findAttribute, getDoNotSendAttributes, getExternal, getProtectedAttributes, getUnprotectedAttributes, removeAttribute, removeAttribute, setExternal
-
-
-
-
Method Detail
-
DecodeFromCBORObject
public void DecodeFromCBORObject(com.upokecenter.cbor.CBORObject obj) throws CoseExceptionDescription copied from class:MessageGiven a CBOR tree, parse the message. This is an abstract function that is implemented for each different supported COSE message.- Specified by:
DecodeFromCBORObjectin classMessage- Parameters:
obj- CBORObject to be converted to a message.- Throws:
CoseException- Internal COSE Exception
-
EncodeCBORObject
protected com.upokecenter.cbor.CBORObject EncodeCBORObject() throws CoseExceptionDescription copied from class:MessageEncode 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:
EncodeCBORObjectin classMessage- Returns:
- CBORObject representing the message.
- Throws:
CoseException- Internal COSE Exception
-
Create
public void Create(byte[] rgbKey) throws CoseException- Throws:
CoseException
-
Validate
public boolean Validate(byte[] rgbKey) throws CoseException- Overrides:
Validatein classMacCommon- Throws:
CoseException
-
-