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

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

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

package com.google.crypto.tink.proto;

/**
 * 
 * A Tink user works usually not with single keys, but with keysets,
 * to enable key rotation.  The keys in a keyset can belong to different
 * implementations/key types, but must all implement the same primitive.
 * Any given keyset (and any given key) can be used for one primitive only.
 * 
* * Protobuf type {@code google.crypto.tink.Keyset} */ public final class Keyset extends com.google.protobuf.GeneratedMessageLite< Keyset, Keyset.Builder> implements // @@protoc_insertion_point(message_implements:google.crypto.tink.Keyset) KeysetOrBuilder { private Keyset() { key_ = emptyProtobufList(); } public interface KeyOrBuilder extends // @@protoc_insertion_point(interface_extends:google.crypto.tink.Keyset.Key) com.google.protobuf.MessageLiteOrBuilder { /** *
     * Contains the actual, instantiation specific key proto.
     * By convention, each key proto contains a version field.
     * 
* * .google.crypto.tink.KeyData key_data = 1; * @return Whether the keyData field is set. */ boolean hasKeyData(); /** *
     * Contains the actual, instantiation specific key proto.
     * By convention, each key proto contains a version field.
     * 
* * .google.crypto.tink.KeyData key_data = 1; * @return The keyData. */ com.google.crypto.tink.proto.KeyData getKeyData(); /** * .google.crypto.tink.KeyStatusType status = 2; * @return The enum numeric value on the wire for status. */ int getStatusValue(); /** * .google.crypto.tink.KeyStatusType status = 2; * @return The status. */ com.google.crypto.tink.proto.KeyStatusType getStatus(); /** *
     * Identifies a key within a keyset, is a part of metadata
     * of a ciphertext/signature.
     * 
* * uint32 key_id = 3; * @return The keyId. */ int getKeyId(); /** *
     * Determines the prefix of the ciphertexts/signatures produced by this key.
     * This value is copied verbatim from the key template.
     * 
* * .google.crypto.tink.OutputPrefixType output_prefix_type = 4; * @return The enum numeric value on the wire for outputPrefixType. */ int getOutputPrefixTypeValue(); /** *
     * Determines the prefix of the ciphertexts/signatures produced by this key.
     * This value is copied verbatim from the key template.
     * 
* * .google.crypto.tink.OutputPrefixType output_prefix_type = 4; * @return The outputPrefixType. */ com.google.crypto.tink.proto.OutputPrefixType getOutputPrefixType(); } /** * Protobuf type {@code google.crypto.tink.Keyset.Key} */ public static final class Key extends com.google.protobuf.GeneratedMessageLite< Key, Key.Builder> implements // @@protoc_insertion_point(message_implements:google.crypto.tink.Keyset.Key) KeyOrBuilder { private Key() { } public static final int KEY_DATA_FIELD_NUMBER = 1; private com.google.crypto.tink.proto.KeyData keyData_; /** *
     * Contains the actual, instantiation specific key proto.
     * By convention, each key proto contains a version field.
     * 
* * .google.crypto.tink.KeyData key_data = 1; */ @java.lang.Override public boolean hasKeyData() { return keyData_ != null; } /** *
     * Contains the actual, instantiation specific key proto.
     * By convention, each key proto contains a version field.
     * 
* * .google.crypto.tink.KeyData key_data = 1; */ @java.lang.Override public com.google.crypto.tink.proto.KeyData getKeyData() { return keyData_ == null ? com.google.crypto.tink.proto.KeyData.getDefaultInstance() : keyData_; } /** *
     * Contains the actual, instantiation specific key proto.
     * By convention, each key proto contains a version field.
     * 
* * .google.crypto.tink.KeyData key_data = 1; */ private void setKeyData(com.google.crypto.tink.proto.KeyData value) { value.getClass(); keyData_ = value; } /** *
     * Contains the actual, instantiation specific key proto.
     * By convention, each key proto contains a version field.
     * 
* * .google.crypto.tink.KeyData key_data = 1; */ @java.lang.SuppressWarnings({"ReferenceEquality"}) private void mergeKeyData(com.google.crypto.tink.proto.KeyData value) { value.getClass(); if (keyData_ != null && keyData_ != com.google.crypto.tink.proto.KeyData.getDefaultInstance()) { keyData_ = com.google.crypto.tink.proto.KeyData.newBuilder(keyData_).mergeFrom(value).buildPartial(); } else { keyData_ = value; } } /** *
     * Contains the actual, instantiation specific key proto.
     * By convention, each key proto contains a version field.
     * 
* * .google.crypto.tink.KeyData key_data = 1; */ private void clearKeyData() { keyData_ = null; } public static final int STATUS_FIELD_NUMBER = 2; private int status_; /** * .google.crypto.tink.KeyStatusType status = 2; * @return The enum numeric value on the wire for status. */ @java.lang.Override public int getStatusValue() { return status_; } /** * .google.crypto.tink.KeyStatusType status = 2; * @return The status. */ @java.lang.Override public com.google.crypto.tink.proto.KeyStatusType getStatus() { com.google.crypto.tink.proto.KeyStatusType result = com.google.crypto.tink.proto.KeyStatusType.forNumber(status_); return result == null ? com.google.crypto.tink.proto.KeyStatusType.UNRECOGNIZED : result; } /** * .google.crypto.tink.KeyStatusType status = 2; * @param value The enum numeric value on the wire for status to set. */ private void setStatusValue(int value) { status_ = value; } /** * .google.crypto.tink.KeyStatusType status = 2; * @param value The status to set. */ private void setStatus(com.google.crypto.tink.proto.KeyStatusType value) { status_ = value.getNumber(); } /** * .google.crypto.tink.KeyStatusType status = 2; */ private void clearStatus() { status_ = 0; } public static final int KEY_ID_FIELD_NUMBER = 3; private int keyId_; /** *
     * Identifies a key within a keyset, is a part of metadata
     * of a ciphertext/signature.
     * 
* * uint32 key_id = 3; * @return The keyId. */ @java.lang.Override public int getKeyId() { return keyId_; } /** *
     * Identifies a key within a keyset, is a part of metadata
     * of a ciphertext/signature.
     * 
* * uint32 key_id = 3; * @param value The keyId to set. */ private void setKeyId(int value) { keyId_ = value; } /** *
     * Identifies a key within a keyset, is a part of metadata
     * of a ciphertext/signature.
     * 
* * uint32 key_id = 3; */ private void clearKeyId() { keyId_ = 0; } public static final int OUTPUT_PREFIX_TYPE_FIELD_NUMBER = 4; private int outputPrefixType_; /** *
     * Determines the prefix of the ciphertexts/signatures produced by this key.
     * This value is copied verbatim from the key template.
     * 
* * .google.crypto.tink.OutputPrefixType output_prefix_type = 4; * @return The enum numeric value on the wire for outputPrefixType. */ @java.lang.Override public int getOutputPrefixTypeValue() { return outputPrefixType_; } /** *
     * Determines the prefix of the ciphertexts/signatures produced by this key.
     * This value is copied verbatim from the key template.
     * 
* * .google.crypto.tink.OutputPrefixType output_prefix_type = 4; * @return The outputPrefixType. */ @java.lang.Override public com.google.crypto.tink.proto.OutputPrefixType getOutputPrefixType() { com.google.crypto.tink.proto.OutputPrefixType result = com.google.crypto.tink.proto.OutputPrefixType.forNumber(outputPrefixType_); return result == null ? com.google.crypto.tink.proto.OutputPrefixType.UNRECOGNIZED : result; } /** *
     * Determines the prefix of the ciphertexts/signatures produced by this key.
     * This value is copied verbatim from the key template.
     * 
* * .google.crypto.tink.OutputPrefixType output_prefix_type = 4; * @param value The enum numeric value on the wire for outputPrefixType to set. */ private void setOutputPrefixTypeValue(int value) { outputPrefixType_ = value; } /** *
     * Determines the prefix of the ciphertexts/signatures produced by this key.
     * This value is copied verbatim from the key template.
     * 
* * .google.crypto.tink.OutputPrefixType output_prefix_type = 4; * @param value The outputPrefixType to set. */ private void setOutputPrefixType(com.google.crypto.tink.proto.OutputPrefixType value) { outputPrefixType_ = value.getNumber(); } /** *
     * Determines the prefix of the ciphertexts/signatures produced by this key.
     * This value is copied verbatim from the key template.
     * 
* * .google.crypto.tink.OutputPrefixType output_prefix_type = 4; */ private void clearOutputPrefixType() { outputPrefixType_ = 0; } public static com.google.crypto.tink.proto.Keyset.Key parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data); } public static com.google.crypto.tink.proto.Keyset.Key parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data, extensionRegistry); } public static com.google.crypto.tink.proto.Keyset.Key parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data); } public static com.google.crypto.tink.proto.Keyset.Key parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data, extensionRegistry); } public static com.google.crypto.tink.proto.Keyset.Key parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data); } public static com.google.crypto.tink.proto.Keyset.Key parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data, extensionRegistry); } public static com.google.crypto.tink.proto.Keyset.Key parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, input); } public static com.google.crypto.tink.proto.Keyset.Key parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, input, extensionRegistry); } public static com.google.crypto.tink.proto.Keyset.Key parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return parseDelimitedFrom(DEFAULT_INSTANCE, input); } public static com.google.crypto.tink.proto.Keyset.Key parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); } public static com.google.crypto.tink.proto.Keyset.Key parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, input); } public static com.google.crypto.tink.proto.Keyset.Key parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, input, extensionRegistry); } public static Builder newBuilder() { return (Builder) DEFAULT_INSTANCE.createBuilder(); } public static Builder newBuilder(com.google.crypto.tink.proto.Keyset.Key prototype) { return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); } /** * Protobuf type {@code google.crypto.tink.Keyset.Key} */ public static final class Builder extends com.google.protobuf.GeneratedMessageLite.Builder< com.google.crypto.tink.proto.Keyset.Key, Builder> implements // @@protoc_insertion_point(builder_implements:google.crypto.tink.Keyset.Key) com.google.crypto.tink.proto.Keyset.KeyOrBuilder { // Construct using com.google.crypto.tink.proto.Keyset.Key.newBuilder() private Builder() { super(DEFAULT_INSTANCE); } /** *
       * Contains the actual, instantiation specific key proto.
       * By convention, each key proto contains a version field.
       * 
* * .google.crypto.tink.KeyData key_data = 1; */ @java.lang.Override public boolean hasKeyData() { return instance.hasKeyData(); } /** *
       * Contains the actual, instantiation specific key proto.
       * By convention, each key proto contains a version field.
       * 
* * .google.crypto.tink.KeyData key_data = 1; */ @java.lang.Override public com.google.crypto.tink.proto.KeyData getKeyData() { return instance.getKeyData(); } /** *
       * Contains the actual, instantiation specific key proto.
       * By convention, each key proto contains a version field.
       * 
* * .google.crypto.tink.KeyData key_data = 1; */ public Builder setKeyData(com.google.crypto.tink.proto.KeyData value) { copyOnWrite(); instance.setKeyData(value); return this; } /** *
       * Contains the actual, instantiation specific key proto.
       * By convention, each key proto contains a version field.
       * 
* * .google.crypto.tink.KeyData key_data = 1; */ public Builder setKeyData( com.google.crypto.tink.proto.KeyData.Builder builderForValue) { copyOnWrite(); instance.setKeyData(builderForValue.build()); return this; } /** *
       * Contains the actual, instantiation specific key proto.
       * By convention, each key proto contains a version field.
       * 
* * .google.crypto.tink.KeyData key_data = 1; */ public Builder mergeKeyData(com.google.crypto.tink.proto.KeyData value) { copyOnWrite(); instance.mergeKeyData(value); return this; } /** *
       * Contains the actual, instantiation specific key proto.
       * By convention, each key proto contains a version field.
       * 
* * .google.crypto.tink.KeyData key_data = 1; */ public Builder clearKeyData() { copyOnWrite(); instance.clearKeyData(); return this; } /** * .google.crypto.tink.KeyStatusType status = 2; * @return The enum numeric value on the wire for status. */ @java.lang.Override public int getStatusValue() { return instance.getStatusValue(); } /** * .google.crypto.tink.KeyStatusType status = 2; * @param value The status to set. * @return This builder for chaining. */ public Builder setStatusValue(int value) { copyOnWrite(); instance.setStatusValue(value); return this; } /** * .google.crypto.tink.KeyStatusType status = 2; * @return The status. */ @java.lang.Override public com.google.crypto.tink.proto.KeyStatusType getStatus() { return instance.getStatus(); } /** * .google.crypto.tink.KeyStatusType status = 2; * @param value The enum numeric value on the wire for status to set. * @return This builder for chaining. */ public Builder setStatus(com.google.crypto.tink.proto.KeyStatusType value) { copyOnWrite(); instance.setStatus(value); return this; } /** * .google.crypto.tink.KeyStatusType status = 2; * @return This builder for chaining. */ public Builder clearStatus() { copyOnWrite(); instance.clearStatus(); return this; } /** *
       * Identifies a key within a keyset, is a part of metadata
       * of a ciphertext/signature.
       * 
* * uint32 key_id = 3; * @return The keyId. */ @java.lang.Override public int getKeyId() { return instance.getKeyId(); } /** *
       * Identifies a key within a keyset, is a part of metadata
       * of a ciphertext/signature.
       * 
* * uint32 key_id = 3; * @param value The keyId to set. * @return This builder for chaining. */ public Builder setKeyId(int value) { copyOnWrite(); instance.setKeyId(value); return this; } /** *
       * Identifies a key within a keyset, is a part of metadata
       * of a ciphertext/signature.
       * 
* * uint32 key_id = 3; * @return This builder for chaining. */ public Builder clearKeyId() { copyOnWrite(); instance.clearKeyId(); return this; } /** *
       * Determines the prefix of the ciphertexts/signatures produced by this key.
       * This value is copied verbatim from the key template.
       * 
* * .google.crypto.tink.OutputPrefixType output_prefix_type = 4; * @return The enum numeric value on the wire for outputPrefixType. */ @java.lang.Override public int getOutputPrefixTypeValue() { return instance.getOutputPrefixTypeValue(); } /** *
       * Determines the prefix of the ciphertexts/signatures produced by this key.
       * This value is copied verbatim from the key template.
       * 
* * .google.crypto.tink.OutputPrefixType output_prefix_type = 4; * @param value The outputPrefixType to set. * @return This builder for chaining. */ public Builder setOutputPrefixTypeValue(int value) { copyOnWrite(); instance.setOutputPrefixTypeValue(value); return this; } /** *
       * Determines the prefix of the ciphertexts/signatures produced by this key.
       * This value is copied verbatim from the key template.
       * 
* * .google.crypto.tink.OutputPrefixType output_prefix_type = 4; * @return The outputPrefixType. */ @java.lang.Override public com.google.crypto.tink.proto.OutputPrefixType getOutputPrefixType() { return instance.getOutputPrefixType(); } /** *
       * Determines the prefix of the ciphertexts/signatures produced by this key.
       * This value is copied verbatim from the key template.
       * 
* * .google.crypto.tink.OutputPrefixType output_prefix_type = 4; * @param value The enum numeric value on the wire for outputPrefixType to set. * @return This builder for chaining. */ public Builder setOutputPrefixType(com.google.crypto.tink.proto.OutputPrefixType value) { copyOnWrite(); instance.setOutputPrefixType(value); return this; } /** *
       * Determines the prefix of the ciphertexts/signatures produced by this key.
       * This value is copied verbatim from the key template.
       * 
* * .google.crypto.tink.OutputPrefixType output_prefix_type = 4; * @return This builder for chaining. */ public Builder clearOutputPrefixType() { copyOnWrite(); instance.clearOutputPrefixType(); return this; } // @@protoc_insertion_point(builder_scope:google.crypto.tink.Keyset.Key) } @java.lang.Override @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) protected final java.lang.Object dynamicMethod( com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, java.lang.Object arg0, java.lang.Object arg1) { switch (method) { case NEW_MUTABLE_INSTANCE: { return new com.google.crypto.tink.proto.Keyset.Key(); } case NEW_BUILDER: { return new Builder(); } case BUILD_MESSAGE_INFO: { java.lang.Object[] objects = new java.lang.Object[] { "keyData_", "status_", "keyId_", "outputPrefixType_", }; java.lang.String info = "\u0000\u0004\u0000\u0000\u0001\u0004\u0004\u0000\u0000\u0000\u0001\t\u0002\f\u0003" + "\u000b\u0004\f"; return newMessageInfo(DEFAULT_INSTANCE, info, objects); } // fall through case GET_DEFAULT_INSTANCE: { return DEFAULT_INSTANCE; } case GET_PARSER: { com.google.protobuf.Parser parser = PARSER; if (parser == null) { synchronized (com.google.crypto.tink.proto.Keyset.Key.class) { parser = PARSER; if (parser == null) { parser = new DefaultInstanceBasedParser( DEFAULT_INSTANCE); PARSER = parser; } } } return parser; } case GET_MEMOIZED_IS_INITIALIZED: { return (byte) 1; } case SET_MEMOIZED_IS_INITIALIZED: { return null; } } throw new UnsupportedOperationException(); } // @@protoc_insertion_point(class_scope:google.crypto.tink.Keyset.Key) private static final com.google.crypto.tink.proto.Keyset.Key DEFAULT_INSTANCE; static { Key defaultInstance = new Key(); // New instances are implicitly immutable so no need to make // immutable. DEFAULT_INSTANCE = defaultInstance; com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( Key.class, defaultInstance); } public static com.google.crypto.tink.proto.Keyset.Key getDefaultInstance() { return DEFAULT_INSTANCE; } private static volatile com.google.protobuf.Parser PARSER; public static com.google.protobuf.Parser parser() { return DEFAULT_INSTANCE.getParserForType(); } } public static final int PRIMARY_KEY_ID_FIELD_NUMBER = 1; private int primaryKeyId_; /** *
   * Identifies key used to generate new crypto data (encrypt, sign).
   * Required.
   * 
* * uint32 primary_key_id = 1; * @return The primaryKeyId. */ @java.lang.Override public int getPrimaryKeyId() { return primaryKeyId_; } /** *
   * Identifies key used to generate new crypto data (encrypt, sign).
   * Required.
   * 
* * uint32 primary_key_id = 1; * @param value The primaryKeyId to set. */ private void setPrimaryKeyId(int value) { primaryKeyId_ = value; } /** *
   * Identifies key used to generate new crypto data (encrypt, sign).
   * Required.
   * 
* * uint32 primary_key_id = 1; */ private void clearPrimaryKeyId() { primaryKeyId_ = 0; } public static final int KEY_FIELD_NUMBER = 2; private com.google.protobuf.Internal.ProtobufList key_; /** *
   * Actual keys in the Keyset.
   * Required.
   * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ @java.lang.Override public java.util.List getKeyList() { return key_; } /** *
   * Actual keys in the Keyset.
   * Required.
   * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ public java.util.List getKeyOrBuilderList() { return key_; } /** *
   * Actual keys in the Keyset.
   * Required.
   * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ @java.lang.Override public int getKeyCount() { return key_.size(); } /** *
   * Actual keys in the Keyset.
   * Required.
   * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ @java.lang.Override public com.google.crypto.tink.proto.Keyset.Key getKey(int index) { return key_.get(index); } /** *
   * Actual keys in the Keyset.
   * Required.
   * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ public com.google.crypto.tink.proto.Keyset.KeyOrBuilder getKeyOrBuilder( int index) { return key_.get(index); } private void ensureKeyIsMutable() { com.google.protobuf.Internal.ProtobufList tmp = key_; if (!tmp.isModifiable()) { key_ = com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); } } /** *
   * Actual keys in the Keyset.
   * Required.
   * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ private void setKey( int index, com.google.crypto.tink.proto.Keyset.Key value) { value.getClass(); ensureKeyIsMutable(); key_.set(index, value); } /** *
   * Actual keys in the Keyset.
   * Required.
   * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ private void addKey(com.google.crypto.tink.proto.Keyset.Key value) { value.getClass(); ensureKeyIsMutable(); key_.add(value); } /** *
   * Actual keys in the Keyset.
   * Required.
   * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ private void addKey( int index, com.google.crypto.tink.proto.Keyset.Key value) { value.getClass(); ensureKeyIsMutable(); key_.add(index, value); } /** *
   * Actual keys in the Keyset.
   * Required.
   * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ private void addAllKey( java.lang.Iterable values) { ensureKeyIsMutable(); com.google.protobuf.AbstractMessageLite.addAll( values, key_); } /** *
   * Actual keys in the Keyset.
   * Required.
   * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ private void clearKey() { key_ = emptyProtobufList(); } /** *
   * Actual keys in the Keyset.
   * Required.
   * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ private void removeKey(int index) { ensureKeyIsMutable(); key_.remove(index); } public static com.google.crypto.tink.proto.Keyset parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data); } public static com.google.crypto.tink.proto.Keyset parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data, extensionRegistry); } public static com.google.crypto.tink.proto.Keyset parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data); } public static com.google.crypto.tink.proto.Keyset parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data, extensionRegistry); } public static com.google.crypto.tink.proto.Keyset parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data); } public static com.google.crypto.tink.proto.Keyset parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data, extensionRegistry); } public static com.google.crypto.tink.proto.Keyset parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, input); } public static com.google.crypto.tink.proto.Keyset parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, input, extensionRegistry); } public static com.google.crypto.tink.proto.Keyset parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return parseDelimitedFrom(DEFAULT_INSTANCE, input); } public static com.google.crypto.tink.proto.Keyset parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); } public static com.google.crypto.tink.proto.Keyset parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, input); } public static com.google.crypto.tink.proto.Keyset parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, input, extensionRegistry); } public static Builder newBuilder() { return (Builder) DEFAULT_INSTANCE.createBuilder(); } public static Builder newBuilder(com.google.crypto.tink.proto.Keyset prototype) { return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); } /** *
   * A Tink user works usually not with single keys, but with keysets,
   * to enable key rotation.  The keys in a keyset can belong to different
   * implementations/key types, but must all implement the same primitive.
   * Any given keyset (and any given key) can be used for one primitive only.
   * 
* * Protobuf type {@code google.crypto.tink.Keyset} */ public static final class Builder extends com.google.protobuf.GeneratedMessageLite.Builder< com.google.crypto.tink.proto.Keyset, Builder> implements // @@protoc_insertion_point(builder_implements:google.crypto.tink.Keyset) com.google.crypto.tink.proto.KeysetOrBuilder { // Construct using com.google.crypto.tink.proto.Keyset.newBuilder() private Builder() { super(DEFAULT_INSTANCE); } /** *
     * Identifies key used to generate new crypto data (encrypt, sign).
     * Required.
     * 
* * uint32 primary_key_id = 1; * @return The primaryKeyId. */ @java.lang.Override public int getPrimaryKeyId() { return instance.getPrimaryKeyId(); } /** *
     * Identifies key used to generate new crypto data (encrypt, sign).
     * Required.
     * 
* * uint32 primary_key_id = 1; * @param value The primaryKeyId to set. * @return This builder for chaining. */ public Builder setPrimaryKeyId(int value) { copyOnWrite(); instance.setPrimaryKeyId(value); return this; } /** *
     * Identifies key used to generate new crypto data (encrypt, sign).
     * Required.
     * 
* * uint32 primary_key_id = 1; * @return This builder for chaining. */ public Builder clearPrimaryKeyId() { copyOnWrite(); instance.clearPrimaryKeyId(); return this; } /** *
     * Actual keys in the Keyset.
     * Required.
     * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ @java.lang.Override public java.util.List getKeyList() { return java.util.Collections.unmodifiableList( instance.getKeyList()); } /** *
     * Actual keys in the Keyset.
     * Required.
     * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ @java.lang.Override public int getKeyCount() { return instance.getKeyCount(); }/** *
     * Actual keys in the Keyset.
     * Required.
     * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ @java.lang.Override public com.google.crypto.tink.proto.Keyset.Key getKey(int index) { return instance.getKey(index); } /** *
     * Actual keys in the Keyset.
     * Required.
     * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ public Builder setKey( int index, com.google.crypto.tink.proto.Keyset.Key value) { copyOnWrite(); instance.setKey(index, value); return this; } /** *
     * Actual keys in the Keyset.
     * Required.
     * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ public Builder setKey( int index, com.google.crypto.tink.proto.Keyset.Key.Builder builderForValue) { copyOnWrite(); instance.setKey(index, builderForValue.build()); return this; } /** *
     * Actual keys in the Keyset.
     * Required.
     * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ public Builder addKey(com.google.crypto.tink.proto.Keyset.Key value) { copyOnWrite(); instance.addKey(value); return this; } /** *
     * Actual keys in the Keyset.
     * Required.
     * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ public Builder addKey( int index, com.google.crypto.tink.proto.Keyset.Key value) { copyOnWrite(); instance.addKey(index, value); return this; } /** *
     * Actual keys in the Keyset.
     * Required.
     * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ public Builder addKey( com.google.crypto.tink.proto.Keyset.Key.Builder builderForValue) { copyOnWrite(); instance.addKey(builderForValue.build()); return this; } /** *
     * Actual keys in the Keyset.
     * Required.
     * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ public Builder addKey( int index, com.google.crypto.tink.proto.Keyset.Key.Builder builderForValue) { copyOnWrite(); instance.addKey(index, builderForValue.build()); return this; } /** *
     * Actual keys in the Keyset.
     * Required.
     * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ public Builder addAllKey( java.lang.Iterable values) { copyOnWrite(); instance.addAllKey(values); return this; } /** *
     * Actual keys in the Keyset.
     * Required.
     * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ public Builder clearKey() { copyOnWrite(); instance.clearKey(); return this; } /** *
     * Actual keys in the Keyset.
     * Required.
     * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ public Builder removeKey(int index) { copyOnWrite(); instance.removeKey(index); return this; } // @@protoc_insertion_point(builder_scope:google.crypto.tink.Keyset) } @java.lang.Override @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) protected final java.lang.Object dynamicMethod( com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, java.lang.Object arg0, java.lang.Object arg1) { switch (method) { case NEW_MUTABLE_INSTANCE: { return new com.google.crypto.tink.proto.Keyset(); } case NEW_BUILDER: { return new Builder(); } case BUILD_MESSAGE_INFO: { java.lang.Object[] objects = new java.lang.Object[] { "primaryKeyId_", "key_", com.google.crypto.tink.proto.Keyset.Key.class, }; java.lang.String info = "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0001\u0000\u0001\u000b\u0002\u001b" + ""; return newMessageInfo(DEFAULT_INSTANCE, info, objects); } // fall through case GET_DEFAULT_INSTANCE: { return DEFAULT_INSTANCE; } case GET_PARSER: { com.google.protobuf.Parser parser = PARSER; if (parser == null) { synchronized (com.google.crypto.tink.proto.Keyset.class) { parser = PARSER; if (parser == null) { parser = new DefaultInstanceBasedParser( DEFAULT_INSTANCE); PARSER = parser; } } } return parser; } case GET_MEMOIZED_IS_INITIALIZED: { return (byte) 1; } case SET_MEMOIZED_IS_INITIALIZED: { return null; } } throw new UnsupportedOperationException(); } // @@protoc_insertion_point(class_scope:google.crypto.tink.Keyset) private static final com.google.crypto.tink.proto.Keyset DEFAULT_INSTANCE; static { Keyset defaultInstance = new Keyset(); // New instances are implicitly immutable so no need to make // immutable. DEFAULT_INSTANCE = defaultInstance; com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( Keyset.class, defaultInstance); } public static com.google.crypto.tink.proto.Keyset getDefaultInstance() { return DEFAULT_INSTANCE; } private static volatile com.google.protobuf.Parser PARSER; public static com.google.protobuf.Parser parser() { return DEFAULT_INSTANCE.getParserForType(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy