All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.opencannabis.schema.crypto.primitives.integrity.HashAlgorithm Maven / Gradle / Ivy

The newest version!
/*
 * Copyright 2019, Momentum Ideas Co.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: crypto/primitives/Integrity.proto

package io.opencannabis.schema.crypto.primitives.integrity;

/**
 * 
 * Enumerates hash algorithms supported or known by the runtime for shared use.
 * 
* * Protobuf enum {@code opencannabis.crypto.HashAlgorithm} */ public enum HashAlgorithm implements com.google.protobuf.ProtocolMessageEnum { /** *
   * Secure Hash Algorithm v2.
   * 
* * SHA1 = 0; */ SHA1(0), /** *
   * Message Digest v5.
   * 
* * MD5 = 1; */ MD5(1), /** *
   * Secure Hash Algorithm, with 256-bit width.
   * 
* * SHA256 = 2; */ SHA256(2), /** *
   * Secure Hash Algorithm, with 384-bit width.
   * 
* * SHA384 = 3; */ SHA384(3), /** *
   * Secure Hash Algorithm, with 512-bit width.
   * 
* * SHA512 = 4; */ SHA512(4), /** *
   * Specifies hashing with MurmurHash.
   * 
* * MURMUR = 6; */ MURMUR(6), UNRECOGNIZED(-1), ; /** *
   * Secure Hash Algorithm v2.
   * 
* * SHA1 = 0; */ public static final int SHA1_VALUE = 0; /** *
   * Message Digest v5.
   * 
* * MD5 = 1; */ public static final int MD5_VALUE = 1; /** *
   * Secure Hash Algorithm, with 256-bit width.
   * 
* * SHA256 = 2; */ public static final int SHA256_VALUE = 2; /** *
   * Secure Hash Algorithm, with 384-bit width.
   * 
* * SHA384 = 3; */ public static final int SHA384_VALUE = 3; /** *
   * Secure Hash Algorithm, with 512-bit width.
   * 
* * SHA512 = 4; */ public static final int SHA512_VALUE = 4; /** *
   * Specifies hashing with MurmurHash.
   * 
* * MURMUR = 6; */ public static final int MURMUR_VALUE = 6; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static HashAlgorithm valueOf(int value) { return forNumber(value); } public static HashAlgorithm forNumber(int value) { switch (value) { case 0: return SHA1; case 1: return MD5; case 2: return SHA256; case 3: return SHA384; case 4: return SHA512; case 6: return MURMUR; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< HashAlgorithm> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public HashAlgorithm findValueByNumber(int number) { return HashAlgorithm.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 io.opencannabis.schema.crypto.primitives.integrity.Integrity.getDescriptor().getEnumTypes().get(0); } private static final HashAlgorithm[] VALUES = values(); public static HashAlgorithm 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 HashAlgorithm(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:opencannabis.crypto.HashAlgorithm) }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy