Enum SigningAlgorithm

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<SigningAlgorithm>

    public enum SigningAlgorithm
    extends java.lang.Enum<SigningAlgorithm>
    The algorithm parameter contains the name of the signature's Algorithm, as registered in the HTTP Signature Algorithms Registry defined by this document. The signature verification is based on the signature's algorithm from the keyId parameter rather than from this algorithm. If algorithm is provided and differs from or is incompatible with the algorithm or key material identified by keyId (for example, algorithm has a value of rsa-sha256 but keyId identifies an EdDSA key), then a verification exception is raised. The default value for this parameter should be "hs2019".
    See Also:
    https://www.ietf.org/id/draft-ietf-httpbis-message-signatures-00.html
    • Enum Constant Detail

      • HS2019

        public static final SigningAlgorithm HS2019
        The actual cryptographic algorithm is derived from metadata associated with keyId. Recommend support for: RSASSA-PSS [RFC8017] using SHA-512 [RFC6234] HMAC [RFC2104] using SHA-512 [RFC6234] ECDSA using curve P-256 [DSS] and SHA-512 [RFC6234] Ed25519ph, Ed25519ctx, and Ed25519 [RFC8032]
    • Method Detail

      • values

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

        public static SigningAlgorithm 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
      • getAlgorithmName

        public java.lang.String getAlgorithmName()
      • getSupportedAlgorithms

        public java.util.Set<Algorithm> getSupportedAlgorithms()
      • get

        public static SigningAlgorithm get​(java.lang.String name)
        Returns the SigningAlgorithm with the specified name.
        Parameters:
        name - the name of the signing algorithm.
        Returns:
        the SigningAlgorithm
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Enum<SigningAlgorithm>