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

com.google.crypto.tink.proto.HpkeAead Maven / Gradle / Ivy

Go to download

Tink is a small cryptographic library that provides a safe, simple, agile and fast way to accomplish some common cryptographic tasks.

There is a newer version: 1.17.0
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: proto/hpke.proto
// Protobuf Java Version: 4.28.2

package com.google.crypto.tink.proto;

/**
 * Protobuf enum {@code google.crypto.tink.HpkeAead}
 */
public enum HpkeAead
    implements com.google.protobuf.ProtocolMessageEnum {
  /**
   * AEAD_UNKNOWN = 0;
   */
  AEAD_UNKNOWN(0),
  /**
   * AES_128_GCM = 1;
   */
  AES_128_GCM(1),
  /**
   * AES_256_GCM = 2;
   */
  AES_256_GCM(2),
  /**
   * CHACHA20_POLY1305 = 3;
   */
  CHACHA20_POLY1305(3),
  UNRECOGNIZED(-1),
  ;

  static {
    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
      /* major= */ 4,
      /* minor= */ 28,
      /* patch= */ 2,
      /* suffix= */ "",
      HpkeAead.class.getName());
  }
  /**
   * AEAD_UNKNOWN = 0;
   */
  public static final int AEAD_UNKNOWN_VALUE = 0;
  /**
   * AES_128_GCM = 1;
   */
  public static final int AES_128_GCM_VALUE = 1;
  /**
   * AES_256_GCM = 2;
   */
  public static final int AES_256_GCM_VALUE = 2;
  /**
   * CHACHA20_POLY1305 = 3;
   */
  public static final int CHACHA20_POLY1305_VALUE = 3;


  public final int getNumber() {
    if (this == UNRECOGNIZED) {
      throw new java.lang.IllegalArgumentException(
          "Can't get the number of an unknown enum value.");
    }
    return value;
  }

  /**
   * @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 HpkeAead valueOf(int value) {
    return forNumber(value);
  }

  /**
   * @param value The numeric wire value of the corresponding enum entry.
   * @return The enum associated with the given numeric wire value.
   */
  public static HpkeAead forNumber(int value) {
    switch (value) {
      case 0: return AEAD_UNKNOWN;
      case 1: return AES_128_GCM;
      case 2: return AES_256_GCM;
      case 3: return CHACHA20_POLY1305;
      default: return null;
    }
  }

  public static com.google.protobuf.Internal.EnumLiteMap
      internalGetValueMap() {
    return internalValueMap;
  }
  private static final com.google.protobuf.Internal.EnumLiteMap<
      HpkeAead> internalValueMap =
        new com.google.protobuf.Internal.EnumLiteMap() {
          public HpkeAead findValueByNumber(int number) {
            return HpkeAead.forNumber(number);
          }
        };

  public final com.google.protobuf.Descriptors.EnumValueDescriptor
      getValueDescriptor() {
    if (this == UNRECOGNIZED) {
      throw new java.lang.IllegalStateException(
          "Can't get the descriptor of an unrecognized enum value.");
    }
    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.Hpke.getDescriptor().getEnumTypes().get(2);
  }

  private static final HpkeAead[] VALUES = values();

  public static HpkeAead 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 HpkeAead(int value) {
    this.value = value;
  }

  // @@protoc_insertion_point(enum_scope:google.crypto.tink.HpkeAead)
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy