Package COSE
Class MacCommon
- java.lang.Object
-
- COSE.Attribute
-
- COSE.Message
-
- COSE.MacCommon
-
- Direct Known Subclasses:
MAC0Message,MACMessage
public abstract class MacCommon extends Message
- Author:
- jimsch
-
-
Field Summary
Fields Modifier and Type Field Description protected SecureRandomrandomprotected byte[]rgbTagprotected StringstrContext-
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 Modifier Constructor Description protectedMacCommon()
-
Method Summary
Modifier and Type Method Description protected byte[]AES_CBC_MAC(AlgorithmID alg, byte[] rgbKey)protected voidCreateWithKey(byte[] rgbKey)protected booleanValidate(byte[] rgbKey)-
Methods inherited from class COSE.Message
addCountersignature, DecodeFromBytes, DecodeFromBytes, DecodeFromCBORObject, EncodeCBORObject, 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
-
-
-
-
Field Detail
-
rgbTag
protected byte[] rgbTag
-
strContext
protected String strContext
-
random
protected SecureRandom random
-
-
Method Detail
-
CreateWithKey
protected void CreateWithKey(byte[] rgbKey) throws CoseException- Throws:
CoseException
-
Validate
protected boolean Validate(byte[] rgbKey) throws CoseException- Throws:
CoseException
-
AES_CBC_MAC
protected byte[] AES_CBC_MAC(AlgorithmID alg, byte[] rgbKey) throws CoseException
- Throws:
CoseException
-
-