public enum COSEAlgorithmIdentifier extends java.lang.Enum<COSEAlgorithmIdentifier>
| Enum Constant and Description |
|---|
EdDSA |
ES256 |
ES384 |
ES512 |
RS1 |
RS256 |
RS384 |
RS512 |
| Modifier and Type | Method and Description |
|---|---|
static java.util.Optional<COSEAlgorithmIdentifier> |
fromId(long id)
Attempt to parse an integer as a
COSEAlgorithmIdentifier. |
static java.util.Optional<COSEAlgorithmIdentifier> |
fromPublicKey(@NonNull ByteArray publicKeyCose)
Read the
COSEAlgorithmIdentifier from a public key in COSE_Key format. |
long |
getId() |
static COSEAlgorithmIdentifier |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static COSEAlgorithmIdentifier[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final COSEAlgorithmIdentifier EdDSA
public static final COSEAlgorithmIdentifier ES256
public static final COSEAlgorithmIdentifier ES384
public static final COSEAlgorithmIdentifier ES512
public static final COSEAlgorithmIdentifier RS256
public static final COSEAlgorithmIdentifier RS384
public static final COSEAlgorithmIdentifier RS512
public static final COSEAlgorithmIdentifier RS1
public static COSEAlgorithmIdentifier[] values()
for (COSEAlgorithmIdentifier c : COSEAlgorithmIdentifier.values()) System.out.println(c);
public static COSEAlgorithmIdentifier valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic static java.util.Optional<COSEAlgorithmIdentifier> fromId(long id)
COSEAlgorithmIdentifier.id - an integer equal to the id of a constant in COSEAlgorithmIdentifierCOSEAlgorithmIdentifier instance whose id equals id
, if any.public static java.util.Optional<COSEAlgorithmIdentifier> fromPublicKey(@NonNull @NonNull ByteArray publicKeyCose)
COSEAlgorithmIdentifier from a public key in COSE_Key format.publicKeyCose - a public key in COSE_Key format.alg of the publicKeyCose parsed as a COSEAlgorithmIdentifier, if possible. Returns empty if the COSEAlgorithmIdentifier
enum has no constant matching the alg value.java.lang.IllegalArgumentException - if publicKeyCose is not a well-formed COSE_Key.public long getId()