// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: proto/common.proto

package com.google.crypto.tink.proto;

Protobuf enum google.crypto.tink.HashType
/** * Protobuf enum {@code google.crypto.tink.HashType} */
public enum HashType implements com.google.protobuf.ProtocolMessageEnum {
UNKNOWN_HASH = 0;
/** * <code>UNKNOWN_HASH = 0;</code> */
UNKNOWN_HASH(0),
Using SHA1 for digital signature is deprecated but HMAC-SHA1 is
SHA1 = 1;
/** * <pre> * Using SHA1 for digital signature is deprecated but HMAC-SHA1 is * </pre> * * <code>SHA1 = 1;</code> */
SHA1(1),
fine.
SHA384 = 2;
/** * <pre> * fine. * </pre> * * <code>SHA384 = 2;</code> */
SHA384(2),
SHA256 = 3;
/** * <code>SHA256 = 3;</code> */
SHA256(3),
SHA512 = 4;
/** * <code>SHA512 = 4;</code> */
SHA512(4), UNRECOGNIZED(-1), ;
UNKNOWN_HASH = 0;
/** * <code>UNKNOWN_HASH = 0;</code> */
public static final int UNKNOWN_HASH_VALUE = 0;
Using SHA1 for digital signature is deprecated but HMAC-SHA1 is
SHA1 = 1;
/** * <pre> * Using SHA1 for digital signature is deprecated but HMAC-SHA1 is * </pre> * * <code>SHA1 = 1;</code> */
public static final int SHA1_VALUE = 1;
fine.
SHA384 = 2;
/** * <pre> * fine. * </pre> * * <code>SHA384 = 2;</code> */
public static final int SHA384_VALUE = 2;
SHA256 = 3;
/** * <code>SHA256 = 3;</code> */
public static final int SHA256_VALUE = 3;
SHA512 = 4;
/** * <code>SHA512 = 4;</code> */
public static final int SHA512_VALUE = 4; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; }
Params:
  • value – The numeric wire value of the corresponding enum entry.
Returns:The enum associated with the given numeric wire value.
Deprecated:Use forNumber(int) instead.
/** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */
@java.lang.Deprecated public static HashType valueOf(int value) { return forNumber(value); }
Params:
  • value – The numeric wire value of the corresponding enum entry.
Returns:The enum associated with the given numeric wire value.
/** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */
public static HashType forNumber(int value) { switch (value) { case 0: return UNKNOWN_HASH; case 1: return SHA1; case 2: return SHA384; case 3: return SHA256; case 4: return SHA512; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap<HashType> internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< HashType> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap<HashType>() { public HashType findValueByNumber(int number) { return HashType.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.crypto.tink.proto.Common.getDescriptor().getEnumTypes().get(2); } private static final HashType[] VALUES = values(); public static HashType valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private HashType(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.crypto.tink.HashType) }