Enum JwsAlgorithmType

    • Enum Constant Detail

      • NONE

        @Deprecated
        public static final JwsAlgorithmType NONE
        Deprecated.
        This algorithm is inherently insecure and shouldn't be used.
        No digital signature or MAC value included.
      • ECDSA

        public static final JwsAlgorithmType ECDSA
        Elliptic Curve DSA signing algorithm.
    • Method Detail

      • values

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

        public static JwsAlgorithmType 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 name
        NullPointerException - if the argument is null
      • isSymmetric

        public boolean isSymmetric()
        Indicates whether the algorithm type is a symmetric (secret key) algorithm like HMAC or a public key algorithm. Note: the special value NONE is treated as a symmetric algorithm by this method, but it doesn't use a key at all.
        Returns:
        true if the algorithm type uses a shared secret key for signing and verification or false if it uses distinct private and public keys for these operations.