com.google.crypto.tink.proto.EcdsaParams Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tink Show documentation
Show all versions of tink Show documentation
Tink is a small cryptographic library that provides a safe, simple, agile and fast way to accomplish some common cryptographic tasks.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: proto/ecdsa.proto
package com.google.crypto.tink.proto;
/**
*
* Protos for Ecdsa.
*
*
* Protobuf type {@code google.crypto.tink.EcdsaParams}
*/
public final class EcdsaParams extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.crypto.tink.EcdsaParams)
EcdsaParamsOrBuilder {
private static final long serialVersionUID = 0L;
// Use EcdsaParams.newBuilder() to construct.
private EcdsaParams(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private EcdsaParams() {
hashType_ = 0;
curve_ = 0;
encoding_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new EcdsaParams();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private EcdsaParams(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
int rawValue = input.readEnum();
hashType_ = rawValue;
break;
}
case 16: {
int rawValue = input.readEnum();
curve_ = rawValue;
break;
}
case 24: {
int rawValue = input.readEnum();
encoding_ = rawValue;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.crypto.tink.proto.Ecdsa.internal_static_google_crypto_tink_EcdsaParams_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.crypto.tink.proto.Ecdsa.internal_static_google_crypto_tink_EcdsaParams_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.crypto.tink.proto.EcdsaParams.class, com.google.crypto.tink.proto.EcdsaParams.Builder.class);
}
public static final int HASH_TYPE_FIELD_NUMBER = 1;
private int hashType_;
/**
*
* Required.
*
*
* .google.crypto.tink.HashType hash_type = 1;
* @return The enum numeric value on the wire for hashType.
*/
public int getHashTypeValue() {
return hashType_;
}
/**
*
* Required.
*
*
* .google.crypto.tink.HashType hash_type = 1;
* @return The hashType.
*/
public com.google.crypto.tink.proto.HashType getHashType() {
@SuppressWarnings("deprecation")
com.google.crypto.tink.proto.HashType result = com.google.crypto.tink.proto.HashType.valueOf(hashType_);
return result == null ? com.google.crypto.tink.proto.HashType.UNRECOGNIZED : result;
}
public static final int CURVE_FIELD_NUMBER = 2;
private int curve_;
/**
*
* Required.
*
*
* .google.crypto.tink.EllipticCurveType curve = 2;
* @return The enum numeric value on the wire for curve.
*/
public int getCurveValue() {
return curve_;
}
/**
*
* Required.
*
*
* .google.crypto.tink.EllipticCurveType curve = 2;
* @return The curve.
*/
public com.google.crypto.tink.proto.EllipticCurveType getCurve() {
@SuppressWarnings("deprecation")
com.google.crypto.tink.proto.EllipticCurveType result = com.google.crypto.tink.proto.EllipticCurveType.valueOf(curve_);
return result == null ? com.google.crypto.tink.proto.EllipticCurveType.UNRECOGNIZED : result;
}
public static final int ENCODING_FIELD_NUMBER = 3;
private int encoding_;
/**
*
* Required.
*
*
* .google.crypto.tink.EcdsaSignatureEncoding encoding = 3;
* @return The enum numeric value on the wire for encoding.
*/
public int getEncodingValue() {
return encoding_;
}
/**
*
* Required.
*
*
* .google.crypto.tink.EcdsaSignatureEncoding encoding = 3;
* @return The encoding.
*/
public com.google.crypto.tink.proto.EcdsaSignatureEncoding getEncoding() {
@SuppressWarnings("deprecation")
com.google.crypto.tink.proto.EcdsaSignatureEncoding result = com.google.crypto.tink.proto.EcdsaSignatureEncoding.valueOf(encoding_);
return result == null ? com.google.crypto.tink.proto.EcdsaSignatureEncoding.UNRECOGNIZED : result;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (hashType_ != com.google.crypto.tink.proto.HashType.UNKNOWN_HASH.getNumber()) {
output.writeEnum(1, hashType_);
}
if (curve_ != com.google.crypto.tink.proto.EllipticCurveType.UNKNOWN_CURVE.getNumber()) {
output.writeEnum(2, curve_);
}
if (encoding_ != com.google.crypto.tink.proto.EcdsaSignatureEncoding.UNKNOWN_ENCODING.getNumber()) {
output.writeEnum(3, encoding_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (hashType_ != com.google.crypto.tink.proto.HashType.UNKNOWN_HASH.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, hashType_);
}
if (curve_ != com.google.crypto.tink.proto.EllipticCurveType.UNKNOWN_CURVE.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, curve_);
}
if (encoding_ != com.google.crypto.tink.proto.EcdsaSignatureEncoding.UNKNOWN_ENCODING.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(3, encoding_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.crypto.tink.proto.EcdsaParams)) {
return super.equals(obj);
}
com.google.crypto.tink.proto.EcdsaParams other = (com.google.crypto.tink.proto.EcdsaParams) obj;
if (hashType_ != other.hashType_) return false;
if (curve_ != other.curve_) return false;
if (encoding_ != other.encoding_) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + HASH_TYPE_FIELD_NUMBER;
hash = (53 * hash) + hashType_;
hash = (37 * hash) + CURVE_FIELD_NUMBER;
hash = (53 * hash) + curve_;
hash = (37 * hash) + ENCODING_FIELD_NUMBER;
hash = (53 * hash) + encoding_;
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.crypto.tink.proto.EcdsaParams parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.crypto.tink.proto.EcdsaParams parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.crypto.tink.proto.EcdsaParams parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.crypto.tink.proto.EcdsaParams parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.crypto.tink.proto.EcdsaParams parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.crypto.tink.proto.EcdsaParams parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.crypto.tink.proto.EcdsaParams parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.crypto.tink.proto.EcdsaParams parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.crypto.tink.proto.EcdsaParams parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.crypto.tink.proto.EcdsaParams parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.crypto.tink.proto.EcdsaParams parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.crypto.tink.proto.EcdsaParams parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.crypto.tink.proto.EcdsaParams prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Protos for Ecdsa.
*
*
* Protobuf type {@code google.crypto.tink.EcdsaParams}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.crypto.tink.EcdsaParams)
com.google.crypto.tink.proto.EcdsaParamsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.crypto.tink.proto.Ecdsa.internal_static_google_crypto_tink_EcdsaParams_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.crypto.tink.proto.Ecdsa.internal_static_google_crypto_tink_EcdsaParams_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.crypto.tink.proto.EcdsaParams.class, com.google.crypto.tink.proto.EcdsaParams.Builder.class);
}
// Construct using com.google.crypto.tink.proto.EcdsaParams.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
hashType_ = 0;
curve_ = 0;
encoding_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.crypto.tink.proto.Ecdsa.internal_static_google_crypto_tink_EcdsaParams_descriptor;
}
@java.lang.Override
public com.google.crypto.tink.proto.EcdsaParams getDefaultInstanceForType() {
return com.google.crypto.tink.proto.EcdsaParams.getDefaultInstance();
}
@java.lang.Override
public com.google.crypto.tink.proto.EcdsaParams build() {
com.google.crypto.tink.proto.EcdsaParams result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.crypto.tink.proto.EcdsaParams buildPartial() {
com.google.crypto.tink.proto.EcdsaParams result = new com.google.crypto.tink.proto.EcdsaParams(this);
result.hashType_ = hashType_;
result.curve_ = curve_;
result.encoding_ = encoding_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.crypto.tink.proto.EcdsaParams) {
return mergeFrom((com.google.crypto.tink.proto.EcdsaParams)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.crypto.tink.proto.EcdsaParams other) {
if (other == com.google.crypto.tink.proto.EcdsaParams.getDefaultInstance()) return this;
if (other.hashType_ != 0) {
setHashTypeValue(other.getHashTypeValue());
}
if (other.curve_ != 0) {
setCurveValue(other.getCurveValue());
}
if (other.encoding_ != 0) {
setEncodingValue(other.getEncodingValue());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.crypto.tink.proto.EcdsaParams parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.crypto.tink.proto.EcdsaParams) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int hashType_ = 0;
/**
*
* Required.
*
*
* .google.crypto.tink.HashType hash_type = 1;
* @return The enum numeric value on the wire for hashType.
*/
public int getHashTypeValue() {
return hashType_;
}
/**
*
* Required.
*
*
* .google.crypto.tink.HashType hash_type = 1;
* @param value The enum numeric value on the wire for hashType to set.
* @return This builder for chaining.
*/
public Builder setHashTypeValue(int value) {
hashType_ = value;
onChanged();
return this;
}
/**
*
* Required.
*
*
* .google.crypto.tink.HashType hash_type = 1;
* @return The hashType.
*/
public com.google.crypto.tink.proto.HashType getHashType() {
@SuppressWarnings("deprecation")
com.google.crypto.tink.proto.HashType result = com.google.crypto.tink.proto.HashType.valueOf(hashType_);
return result == null ? com.google.crypto.tink.proto.HashType.UNRECOGNIZED : result;
}
/**
*
* Required.
*
*
* .google.crypto.tink.HashType hash_type = 1;
* @param value The hashType to set.
* @return This builder for chaining.
*/
public Builder setHashType(com.google.crypto.tink.proto.HashType value) {
if (value == null) {
throw new NullPointerException();
}
hashType_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Required.
*
*
* .google.crypto.tink.HashType hash_type = 1;
* @return This builder for chaining.
*/
public Builder clearHashType() {
hashType_ = 0;
onChanged();
return this;
}
private int curve_ = 0;
/**
*
* Required.
*
*
* .google.crypto.tink.EllipticCurveType curve = 2;
* @return The enum numeric value on the wire for curve.
*/
public int getCurveValue() {
return curve_;
}
/**
*
* Required.
*
*
* .google.crypto.tink.EllipticCurveType curve = 2;
* @param value The enum numeric value on the wire for curve to set.
* @return This builder for chaining.
*/
public Builder setCurveValue(int value) {
curve_ = value;
onChanged();
return this;
}
/**
*
* Required.
*
*
* .google.crypto.tink.EllipticCurveType curve = 2;
* @return The curve.
*/
public com.google.crypto.tink.proto.EllipticCurveType getCurve() {
@SuppressWarnings("deprecation")
com.google.crypto.tink.proto.EllipticCurveType result = com.google.crypto.tink.proto.EllipticCurveType.valueOf(curve_);
return result == null ? com.google.crypto.tink.proto.EllipticCurveType.UNRECOGNIZED : result;
}
/**
*
* Required.
*
*
* .google.crypto.tink.EllipticCurveType curve = 2;
* @param value The curve to set.
* @return This builder for chaining.
*/
public Builder setCurve(com.google.crypto.tink.proto.EllipticCurveType value) {
if (value == null) {
throw new NullPointerException();
}
curve_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Required.
*
*
* .google.crypto.tink.EllipticCurveType curve = 2;
* @return This builder for chaining.
*/
public Builder clearCurve() {
curve_ = 0;
onChanged();
return this;
}
private int encoding_ = 0;
/**
*
* Required.
*
*
* .google.crypto.tink.EcdsaSignatureEncoding encoding = 3;
* @return The enum numeric value on the wire for encoding.
*/
public int getEncodingValue() {
return encoding_;
}
/**
*
* Required.
*
*
* .google.crypto.tink.EcdsaSignatureEncoding encoding = 3;
* @param value The enum numeric value on the wire for encoding to set.
* @return This builder for chaining.
*/
public Builder setEncodingValue(int value) {
encoding_ = value;
onChanged();
return this;
}
/**
*
* Required.
*
*
* .google.crypto.tink.EcdsaSignatureEncoding encoding = 3;
* @return The encoding.
*/
public com.google.crypto.tink.proto.EcdsaSignatureEncoding getEncoding() {
@SuppressWarnings("deprecation")
com.google.crypto.tink.proto.EcdsaSignatureEncoding result = com.google.crypto.tink.proto.EcdsaSignatureEncoding.valueOf(encoding_);
return result == null ? com.google.crypto.tink.proto.EcdsaSignatureEncoding.UNRECOGNIZED : result;
}
/**
*
* Required.
*
*
* .google.crypto.tink.EcdsaSignatureEncoding encoding = 3;
* @param value The encoding to set.
* @return This builder for chaining.
*/
public Builder setEncoding(com.google.crypto.tink.proto.EcdsaSignatureEncoding value) {
if (value == null) {
throw new NullPointerException();
}
encoding_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Required.
*
*
* .google.crypto.tink.EcdsaSignatureEncoding encoding = 3;
* @return This builder for chaining.
*/
public Builder clearEncoding() {
encoding_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.crypto.tink.EcdsaParams)
}
// @@protoc_insertion_point(class_scope:google.crypto.tink.EcdsaParams)
private static final com.google.crypto.tink.proto.EcdsaParams DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.crypto.tink.proto.EcdsaParams();
}
public static com.google.crypto.tink.proto.EcdsaParams getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public EcdsaParams parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new EcdsaParams(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.crypto.tink.proto.EcdsaParams getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy