Enum HashAlgorithm

  • All Implemented Interfaces:
    com.google.protobuf.Internal.EnumLite, com.google.protobuf.ProtocolMessageEnum, java.io.Serializable, java.lang.Comparable<HashAlgorithm>

    public enum HashAlgorithm
    extends java.lang.Enum<HashAlgorithm>
    implements com.google.protobuf.ProtocolMessageEnum
     Only a subset of the secure hash standard algorithms are supported.
     See <https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf> for more
     details.
     UNSPECIFIED SHOULD not be used, primary reason for inclusion is to force
     any proto JSON serialization to emit the used hash algorithm, as default
     option is to *omit* the default value of an enum (which is the first
     value, represented by '0'.
     
    Protobuf enum dev.sigstore.common.v1.HashAlgorithm
    • Enum Constant Detail

      • HASH_ALGORITHM_UNSPECIFIED

        public static final HashAlgorithm HASH_ALGORITHM_UNSPECIFIED
        HASH_ALGORITHM_UNSPECIFIED = 0;
      • SHA2_256

        public static final HashAlgorithm SHA2_256
        SHA2_256 = 1;
      • SHA2_384

        public static final HashAlgorithm SHA2_384
        SHA2_384 = 2;
      • SHA2_512

        public static final HashAlgorithm SHA2_512
        SHA2_512 = 3;
      • SHA3_256

        public static final HashAlgorithm SHA3_256
        SHA3_256 = 4;
      • SHA3_384

        public static final HashAlgorithm SHA3_384
        SHA3_384 = 5;
    • Field Detail

      • HASH_ALGORITHM_UNSPECIFIED_VALUE

        public static final int HASH_ALGORITHM_UNSPECIFIED_VALUE
        HASH_ALGORITHM_UNSPECIFIED = 0;
        See Also:
        Constant Field Values
    • Method Detail

      • values

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

        public static HashAlgorithm 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
      • getNumber

        public final int getNumber()
        Specified by:
        getNumber in interface com.google.protobuf.Internal.EnumLite
        Specified by:
        getNumber in interface com.google.protobuf.ProtocolMessageEnum
      • valueOf

        @Deprecated
        public static HashAlgorithm valueOf​(int value)
        Deprecated.
        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:
        value - 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
      • forNumber

        public static HashAlgorithm forNumber​(int value)
        Parameters:
        value - The numeric wire value of the corresponding enum entry.
        Returns:
        The enum associated with the given numeric wire value.
      • internalGetValueMap

        public static com.google.protobuf.Internal.EnumLiteMap<HashAlgorithm> internalGetValueMap()
      • getValueDescriptor

        public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
        Specified by:
        getValueDescriptor in interface com.google.protobuf.ProtocolMessageEnum
      • getDescriptorForType

        public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.ProtocolMessageEnum
      • getDescriptor

        public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
      • valueOf

        public static HashAlgorithm valueOf​(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
        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:
        desc - 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