Enum DigestChoice

    • Enum Constant Detail

      • SHA256

        public static final DigestChoice SHA256
        SHA-256 digest.
      • SHA384

        public static final DigestChoice SHA384
        SHA-384 digest.
      • SHA512

        public static final DigestChoice SHA512
        SHA-512 digest.
    • Field Detail

      • otherName

        private final String otherName
        Other name (with hyphens, etc.) used as an alternative to the enum name.
      • digestAlgorithm

        private final String digestAlgorithm
        Digest algorithm.
      • rsaAlgorithm

        private final String rsaAlgorithm
        RSA signature algorithm.
      • ecdsaAlgorithm

        private final String ecdsaAlgorithm
        ECDSA signature algorithm.
    • Constructor Detail

      • DigestChoice

        private DigestChoice​(String otherNameArg,
                             String digestArg,
                             String rsaArg,
                             String ecdsaArg)
        Constructor.
        Parameters:
        otherNameArg - an alternative name for the enum.
        digestArg - digest algorithm URI
        rsaArg - RSA signature algorithm URI
        ecdsaArg - ECDSA signature algorithm URI
    • Method Detail

      • values

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

        public static DigestChoice 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
      • getDigestAlgorithm

        public String getDigestAlgorithm()
        Returns the digest algorithm URI for this digest choice.
        Returns:
        algorithm URI
      • getRSAAlgorithm

        public String getRSAAlgorithm()
        Returns the RSA signature algorithm URI for this digest choice.
        Returns:
        algorithm URI
      • getECDSAAlgorithm

        public String getECDSAAlgorithm()
        Returns the ECDSA signature algorithm URI for this digest choice.
        Returns:
        algorithm URI
      • hasName

        public boolean hasName​(String name)
        Indicates whether the enum can be called by the provided name. The name is compared ignoring case against the enum name and against the "other" name.
        Parameters:
        name - name to check against
        Returns:
        true if and only if the enum can be called by the provided name