Package dev.sigstore.proto.common.v1
Enum HashAlgorithm
- java.lang.Object
-
- java.lang.Enum<HashAlgorithm>
-
- dev.sigstore.proto.common.v1.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 enumdev.sigstore.common.v1.HashAlgorithm
-
-
Enum Constant Summary
Enum Constants Enum Constant Description HASH_ALGORITHM_UNSPECIFIEDHASH_ALGORITHM_UNSPECIFIED = 0;SHA2_256SHA2_256 = 1;SHA2_384SHA2_384 = 2;SHA2_512SHA2_512 = 3;SHA3_256SHA3_256 = 4;SHA3_384SHA3_384 = 5;UNRECOGNIZED
-
Field Summary
Fields Modifier and Type Field Description static intHASH_ALGORITHM_UNSPECIFIED_VALUEHASH_ALGORITHM_UNSPECIFIED = 0;static intSHA2_256_VALUESHA2_256 = 1;static intSHA2_384_VALUESHA2_384 = 2;static intSHA2_512_VALUESHA2_512 = 3;static intSHA3_256_VALUESHA3_256 = 4;static intSHA3_384_VALUESHA3_384 = 5;
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static HashAlgorithmforNumber(int value)static com.google.protobuf.Descriptors.EnumDescriptorgetDescriptor()com.google.protobuf.Descriptors.EnumDescriptorgetDescriptorForType()intgetNumber()com.google.protobuf.Descriptors.EnumValueDescriptorgetValueDescriptor()static com.google.protobuf.Internal.EnumLiteMap<HashAlgorithm>internalGetValueMap()static HashAlgorithmvalueOf(int value)Deprecated.static HashAlgorithmvalueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)Returns the enum constant of this type with the specified name.static HashAlgorithmvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static HashAlgorithm[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
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;
-
UNRECOGNIZED
public static final HashAlgorithm UNRECOGNIZED
-
-
Field Detail
-
HASH_ALGORITHM_UNSPECIFIED_VALUE
public static final int HASH_ALGORITHM_UNSPECIFIED_VALUE
HASH_ALGORITHM_UNSPECIFIED = 0;- See Also:
- Constant Field Values
-
SHA2_256_VALUE
public static final int SHA2_256_VALUE
SHA2_256 = 1;- See Also:
- Constant Field Values
-
SHA2_384_VALUE
public static final int SHA2_384_VALUE
SHA2_384 = 2;- See Also:
- Constant Field Values
-
SHA2_512_VALUE
public static final int SHA2_512_VALUE
SHA2_512 = 3;- See Also:
- Constant Field Values
-
SHA3_256_VALUE
public static final int SHA3_256_VALUE
SHA3_256 = 4;- See Also:
- Constant Field Values
-
SHA3_384_VALUE
public static final int SHA3_384_VALUE
SHA3_384 = 5;- 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 namejava.lang.NullPointerException- if the argument is null
-
getNumber
public final int getNumber()
- Specified by:
getNumberin interfacecom.google.protobuf.Internal.EnumLite- Specified by:
getNumberin interfacecom.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 namejava.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:
getValueDescriptorin interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptorForType
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.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 namejava.lang.NullPointerException- if the argument is null
-
-