Package se.digg.dgc.signatures.cose
Enum HeaderParameterKey
- java.lang.Object
-
- java.lang.Enum<HeaderParameterKey>
-
- se.digg.dgc.signatures.cose.HeaderParameterKey
-
- All Implemented Interfaces:
Serializable
,Comparable<HeaderParameterKey>
public enum HeaderParameterKey extends Enum<HeaderParameterKey>
Representation of COSE header parameter keys.Only those relevant for our use case are represented.
- Author:
- Martin Lindström (martin@idsec.se), Henrik Bengtsson (extern.henrik.bengtsson@digg.se), Henric Norlander (extern.henric.norlander@digg.se)
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALG
Algorithm used for security processing.CONTENT_TYPE
This parameter is used to indicate the content type of the data in the payload or ciphertext fields.CRIT
Critical headers to be understood.KID
This parameter identifies one piece of data that can be used as input to find the needed cryptographic key.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HeaderParameterKey
fromCborObject(com.upokecenter.cbor.CBORObject value)
Given a CBOR object the method gets the correspondingHeaderParameterKey
.static HeaderParameterKey
fromValue(int value)
Given a value the method gets the correspondingHeaderParameterKey
.com.upokecenter.cbor.CBORObject
getCborObject()
Gets the header parameter key as a CBOR object.int
getValue()
Gets the CBOR value for the header parameter key.static HeaderParameterKey
valueOf(String name)
Returns the enum constant of this type with the specified name.static HeaderParameterKey[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ALG
public static final HeaderParameterKey ALG
Algorithm used for security processing.
-
CRIT
public static final HeaderParameterKey CRIT
Critical headers to be understood.
-
CONTENT_TYPE
public static final HeaderParameterKey CONTENT_TYPE
This parameter is used to indicate the content type of the data in the payload or ciphertext fields.
-
KID
public static final HeaderParameterKey KID
This parameter identifies one piece of data that can be used as input to find the needed cryptographic key.
-
-
Method Detail
-
values
public static HeaderParameterKey[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (HeaderParameterKey c : HeaderParameterKey.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static HeaderParameterKey valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
fromCborObject
public static HeaderParameterKey fromCborObject(com.upokecenter.cbor.CBORObject value)
Given a CBOR object the method gets the correspondingHeaderParameterKey
.- Parameters:
value
- the value- Returns:
- a HeaderParameterKey
-
fromValue
public static HeaderParameterKey fromValue(int value)
Given a value the method gets the correspondingHeaderParameterKey
.- Parameters:
value
- the value- Returns:
- a HeaderParameterKey
-
getCborObject
public com.upokecenter.cbor.CBORObject getCborObject()
Gets the header parameter key as a CBOR object.- Returns:
- a CBORObject
-
getValue
public int getValue()
Gets the CBOR value for the header parameter key.- Returns:
- the value
-
-