Class COSEAlgorithms

java.lang.Object
com.authlete.cose.constants.COSEAlgorithms

public final class COSEAlgorithms extends Object
COSE Algorithms
Name Value Description
RS512 -259 RSASSA-PKCS1-v1_5 using SHA-512
RS384 -258 RSASSA-PKCS1-v1_5 using SHA-384
RS256 -257 RSASSA-PKCS1-v1_5 using SHA-256
ES256K -47 ECDSA using secp256k1 curve and SHA-256
PS512 -39 RSASSA-PSS w/ SHA-512
PS384 -38 RSASSA-PSS w/ SHA-384
PS256 -37 RSASSA-PSS w/ SHA-256
ES512 -36 ECDSA w/ SHA-512
ES384 -35 ECDSA w/ SHA-384
EdDSA -8 EdDSA
ES256 -7 ECDSA w/ SHA-256
Since:
1.1
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    EdDSA (-8); EdDSA
    static final int
    ES256 (-7); ECDSA w/ SHA-256
    static final int
    ES256K (-47); ECDSA using secp256k1 curve and SHA-256
    static final int
    ES384 (-35); ECDSA w/ SHA-384
    static final int
    ES512 (-36); ECDSA w/ SHA-512
    static final int
    PS256 (-37); RSASSA-PSS w/ SHA-256
    static final int
    PS384 (-38); RSASSA-PSS w/ SHA-384
    static final int
    PS512 (-39); RSASSA-PSS w/ SHA-512
    static final int
    RS256 (-257); RSASSA-PKCS1-v1_5 using SHA-256
    static final int
    RS384 (-258); RSASSA-PKCS1-v1_5 using SHA-384
    static final int
    RS512 (-259); RSASSA-PKCS1-v1_5 using SHA-512
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    getNameByValue(int value)
    Get the name of the algorithm to which the integer identifier has been assigned to.
    static int
    Get the integer identifier assigned to the algorithm.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • RS512

      public static final int RS512
      RS512 (-259); RSASSA-PKCS1-v1_5 using SHA-512
      Since:
      1.3
      See Also:
    • RS384

      public static final int RS384
      RS384 (-258); RSASSA-PKCS1-v1_5 using SHA-384
      Since:
      1.3
      See Also:
    • RS256

      public static final int RS256
      RS256 (-257); RSASSA-PKCS1-v1_5 using SHA-256
      Since:
      1.3
      See Also:
    • ES256K

      public static final int ES256K
      ES256K (-47); ECDSA using secp256k1 curve and SHA-256
      Since:
      1.3
      See Also:
    • PS512

      public static final int PS512
      PS512 (-39); RSASSA-PSS w/ SHA-512
      See Also:
    • PS384

      public static final int PS384
      PS384 (-38); RSASSA-PSS w/ SHA-384
      See Also:
    • PS256

      public static final int PS256
      PS256 (-37); RSASSA-PSS w/ SHA-256
      See Also:
    • ES512

      public static final int ES512
      ES512 (-36); ECDSA w/ SHA-512
      See Also:
    • ES384

      public static final int ES384
      ES384 (-35); ECDSA w/ SHA-384
      See Also:
    • EdDSA

      public static final int EdDSA
      EdDSA (-8); EdDSA
      See Also:
    • ES256

      public static final int ES256
      ES256 (-7); ECDSA w/ SHA-256
      See Also:
  • Method Details

    • getValueByName

      public static int getValueByName(String name)
      Get the integer identifier assigned to the algorithm.
      Parameters:
      name - An algorithm name such as "ES256". If null is given, 0 is returned.
      Returns:
      The integer identifier assigned to the algorithm. If the given name is not recognized, 0 is returned.
    • getNameByValue

      public static String getNameByValue(int value)
      Get the name of the algorithm to which the integer identifier has been assigned to.
      Parameters:
      value - An integer identifier assigned to an algorithm.
      Returns:
      The name of the algorithm to which the integer identifier has been assigned to. If the given identifier is not recognized, null is returned.