Package dev.sigstore.proto.common.v1
Enum Class HashAlgorithm
- All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite
,com.google.protobuf.ProtocolMessageEnum
,Serializable
,Comparable<HashAlgorithm>
,Constable
public enum HashAlgorithm
extends 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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionHASH_ALGORITHM_UNSPECIFIED = 0;
SHA2_256 = 1;
SHA2_384 = 2;
SHA2_512 = 3;
SHA3_256 = 4;
SHA3_384 = 5;
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
HASH_ALGORITHM_UNSPECIFIED = 0;
static final int
SHA2_256 = 1;
static final int
SHA2_384 = 2;
static final int
SHA2_512 = 3;
static final int
SHA3_256 = 4;
static final int
SHA3_384 = 5;
-
Method Summary
Modifier and TypeMethodDescriptionstatic HashAlgorithm
forNumber
(int value) static final com.google.protobuf.Descriptors.EnumDescriptor
final com.google.protobuf.Descriptors.EnumDescriptor
final int
final com.google.protobuf.Descriptors.EnumValueDescriptor
static com.google.protobuf.Internal.EnumLiteMap<HashAlgorithm>
static HashAlgorithm
valueOf
(int value) Deprecated.static HashAlgorithm
valueOf
(com.google.protobuf.Descriptors.EnumValueDescriptor desc) Returns the enum constant of this class with the specified name.static HashAlgorithm
Returns the enum constant of this class with the specified name.static HashAlgorithm[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
HASH_ALGORITHM_UNSPECIFIED
HASH_ALGORITHM_UNSPECIFIED = 0;
-
SHA2_256
SHA2_256 = 1;
-
SHA2_384
SHA2_384 = 2;
-
SHA2_512
SHA2_512 = 3;
-
SHA3_256
SHA3_256 = 4;
-
SHA3_384
SHA3_384 = 5;
-
UNRECOGNIZED
-
-
Field Details
-
HASH_ALGORITHM_UNSPECIFIED_VALUE
public static final int HASH_ALGORITHM_UNSPECIFIED_VALUEHASH_ALGORITHM_UNSPECIFIED = 0;
- See Also:
-
SHA2_256_VALUE
public static final int SHA2_256_VALUESHA2_256 = 1;
- See Also:
-
SHA2_384_VALUE
public static final int SHA2_384_VALUESHA2_384 = 2;
- See Also:
-
SHA2_512_VALUE
public static final int SHA2_512_VALUESHA2_512 = 3;
- See Also:
-
SHA3_256_VALUE
public static final int SHA3_256_VALUESHA3_256 = 4;
- See Also:
-
SHA3_384_VALUE
public static final int SHA3_384_VALUESHA3_384 = 5;
- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
getNumber
public final int getNumber()- Specified by:
getNumber
in interfacecom.google.protobuf.Internal.EnumLite
- Specified by:
getNumber
in interfacecom.google.protobuf.ProtocolMessageEnum
-
valueOf
Deprecated.Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
forNumber
- Parameters:
value
- The numeric wire value of the corresponding enum entry.- Returns:
- The enum associated with the given numeric wire value.
-
internalGetValueMap
-
getValueDescriptor
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()- Specified by:
getValueDescriptor
in interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptorForType
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptor
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() -
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-