Enum SignatureAlgorithm

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ES256
      ECDSA using P-256 and SHA-256 (Recommended+)
      ES384
      ECDSA using P-384 and SHA-384 (Optional)
      ES512
      ECDSA using P-521 and SHA-512 (Optional)
      PS256
      RSASSA-PSS using SHA-256 and MGF1 with SHA-256 (Optional)
      PS384
      RSASSA-PSS using SHA-384 and MGF1 with SHA-384 (Optional)
      PS512
      RSASSA-PSS using SHA-512 and MGF1 with SHA-512 (Optional)
      RS256
      RSASSA-PKCS1-v1_5 using SHA-256 (Recommended)
      RS384
      RSASSA-PKCS1-v1_5 using SHA-384 (Optional)
      RS512
      RSASSA-PKCS1-v1_5 using SHA-512 (Optional)
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static SignatureAlgorithm from​(java.lang.String name)
      Attempt to resolve the provided algorithm name to a SignatureAlgorithm.
      java.lang.String getName()
      Returns the algorithm name.
      static SignatureAlgorithm valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static SignatureAlgorithm[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • RS256

        public static final SignatureAlgorithm RS256
        RSASSA-PKCS1-v1_5 using SHA-256 (Recommended)
      • RS384

        public static final SignatureAlgorithm RS384
        RSASSA-PKCS1-v1_5 using SHA-384 (Optional)
      • RS512

        public static final SignatureAlgorithm RS512
        RSASSA-PKCS1-v1_5 using SHA-512 (Optional)
      • ES256

        public static final SignatureAlgorithm ES256
        ECDSA using P-256 and SHA-256 (Recommended+)
      • ES384

        public static final SignatureAlgorithm ES384
        ECDSA using P-384 and SHA-384 (Optional)
      • ES512

        public static final SignatureAlgorithm ES512
        ECDSA using P-521 and SHA-512 (Optional)
      • PS256

        public static final SignatureAlgorithm PS256
        RSASSA-PSS using SHA-256 and MGF1 with SHA-256 (Optional)
      • PS384

        public static final SignatureAlgorithm PS384
        RSASSA-PSS using SHA-384 and MGF1 with SHA-384 (Optional)
      • PS512

        public static final SignatureAlgorithm PS512
        RSASSA-PSS using SHA-512 and MGF1 with SHA-512 (Optional)
    • Method Detail

      • values

        public static SignatureAlgorithm[] 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 (SignatureAlgorithm c : SignatureAlgorithm.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static SignatureAlgorithm valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getName

        public java.lang.String getName()
        Returns the algorithm name.
        Specified by:
        getName in interface JwaAlgorithm
        Returns:
        the algorithm name
      • from

        public static SignatureAlgorithm from​(java.lang.String name)
        Attempt to resolve the provided algorithm name to a SignatureAlgorithm.
        Parameters:
        name - the algorithm name
        Returns:
        the resolved SignatureAlgorithm, or null if not found