xref: /aosp_15_r20/external/tink/go/proto/common_go_proto/common.pb.go (revision e7b1675dde1b92d52ec075b0a92829627f2c52a5)
1// Copyright 2017 Google Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15////////////////////////////////////////////////////////////////////////////////
16
17// Definitions for common cryptographic enum types.
18
19// Code generated by protoc-gen-go. DO NOT EDIT.
20// versions:
21// 	protoc-gen-go v1.28.1
22// 	protoc        v3.21.12
23// source: third_party/tink/proto/common.proto
24
25package common_go_proto
26
27import (
28	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
29	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
30	reflect "reflect"
31	sync "sync"
32)
33
34const (
35	// Verify that this generated code is sufficiently up-to-date.
36	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
37	// Verify that runtime/protoimpl is sufficiently up-to-date.
38	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
39)
40
41type EllipticCurveType int32
42
43const (
44	EllipticCurveType_UNKNOWN_CURVE EllipticCurveType = 0
45	EllipticCurveType_NIST_P256     EllipticCurveType = 2
46	EllipticCurveType_NIST_P384     EllipticCurveType = 3
47	EllipticCurveType_NIST_P521     EllipticCurveType = 4
48	EllipticCurveType_CURVE25519    EllipticCurveType = 5
49)
50
51// Enum value maps for EllipticCurveType.
52var (
53	EllipticCurveType_name = map[int32]string{
54		0: "UNKNOWN_CURVE",
55		2: "NIST_P256",
56		3: "NIST_P384",
57		4: "NIST_P521",
58		5: "CURVE25519",
59	}
60	EllipticCurveType_value = map[string]int32{
61		"UNKNOWN_CURVE": 0,
62		"NIST_P256":     2,
63		"NIST_P384":     3,
64		"NIST_P521":     4,
65		"CURVE25519":    5,
66	}
67)
68
69func (x EllipticCurveType) Enum() *EllipticCurveType {
70	p := new(EllipticCurveType)
71	*p = x
72	return p
73}
74
75func (x EllipticCurveType) String() string {
76	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
77}
78
79func (EllipticCurveType) Descriptor() protoreflect.EnumDescriptor {
80	return file_third_party_tink_proto_common_proto_enumTypes[0].Descriptor()
81}
82
83func (EllipticCurveType) Type() protoreflect.EnumType {
84	return &file_third_party_tink_proto_common_proto_enumTypes[0]
85}
86
87func (x EllipticCurveType) Number() protoreflect.EnumNumber {
88	return protoreflect.EnumNumber(x)
89}
90
91// Deprecated: Use EllipticCurveType.Descriptor instead.
92func (EllipticCurveType) EnumDescriptor() ([]byte, []int) {
93	return file_third_party_tink_proto_common_proto_rawDescGZIP(), []int{0}
94}
95
96type EcPointFormat int32
97
98const (
99	EcPointFormat_UNKNOWN_FORMAT EcPointFormat = 0
100	EcPointFormat_UNCOMPRESSED   EcPointFormat = 1
101	EcPointFormat_COMPRESSED     EcPointFormat = 2
102	// Like UNCOMPRESSED but without the \x04 prefix. Crunchy uses this format.
103	// DO NOT USE unless you are a Crunchy user moving to Tink.
104	EcPointFormat_DO_NOT_USE_CRUNCHY_UNCOMPRESSED EcPointFormat = 3
105)
106
107// Enum value maps for EcPointFormat.
108var (
109	EcPointFormat_name = map[int32]string{
110		0: "UNKNOWN_FORMAT",
111		1: "UNCOMPRESSED",
112		2: "COMPRESSED",
113		3: "DO_NOT_USE_CRUNCHY_UNCOMPRESSED",
114	}
115	EcPointFormat_value = map[string]int32{
116		"UNKNOWN_FORMAT":                  0,
117		"UNCOMPRESSED":                    1,
118		"COMPRESSED":                      2,
119		"DO_NOT_USE_CRUNCHY_UNCOMPRESSED": 3,
120	}
121)
122
123func (x EcPointFormat) Enum() *EcPointFormat {
124	p := new(EcPointFormat)
125	*p = x
126	return p
127}
128
129func (x EcPointFormat) String() string {
130	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
131}
132
133func (EcPointFormat) Descriptor() protoreflect.EnumDescriptor {
134	return file_third_party_tink_proto_common_proto_enumTypes[1].Descriptor()
135}
136
137func (EcPointFormat) Type() protoreflect.EnumType {
138	return &file_third_party_tink_proto_common_proto_enumTypes[1]
139}
140
141func (x EcPointFormat) Number() protoreflect.EnumNumber {
142	return protoreflect.EnumNumber(x)
143}
144
145// Deprecated: Use EcPointFormat.Descriptor instead.
146func (EcPointFormat) EnumDescriptor() ([]byte, []int) {
147	return file_third_party_tink_proto_common_proto_rawDescGZIP(), []int{1}
148}
149
150type HashType int32
151
152const (
153	HashType_UNKNOWN_HASH HashType = 0
154	HashType_SHA1         HashType = 1 // Using SHA1 for digital signature is deprecated but HMAC-SHA1 is
155	// fine.
156	HashType_SHA384 HashType = 2
157	HashType_SHA256 HashType = 3
158	HashType_SHA512 HashType = 4
159	HashType_SHA224 HashType = 5
160)
161
162// Enum value maps for HashType.
163var (
164	HashType_name = map[int32]string{
165		0: "UNKNOWN_HASH",
166		1: "SHA1",
167		2: "SHA384",
168		3: "SHA256",
169		4: "SHA512",
170		5: "SHA224",
171	}
172	HashType_value = map[string]int32{
173		"UNKNOWN_HASH": 0,
174		"SHA1":         1,
175		"SHA384":       2,
176		"SHA256":       3,
177		"SHA512":       4,
178		"SHA224":       5,
179	}
180)
181
182func (x HashType) Enum() *HashType {
183	p := new(HashType)
184	*p = x
185	return p
186}
187
188func (x HashType) String() string {
189	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
190}
191
192func (HashType) Descriptor() protoreflect.EnumDescriptor {
193	return file_third_party_tink_proto_common_proto_enumTypes[2].Descriptor()
194}
195
196func (HashType) Type() protoreflect.EnumType {
197	return &file_third_party_tink_proto_common_proto_enumTypes[2]
198}
199
200func (x HashType) Number() protoreflect.EnumNumber {
201	return protoreflect.EnumNumber(x)
202}
203
204// Deprecated: Use HashType.Descriptor instead.
205func (HashType) EnumDescriptor() ([]byte, []int) {
206	return file_third_party_tink_proto_common_proto_rawDescGZIP(), []int{2}
207}
208
209var File_third_party_tink_proto_common_proto protoreflect.FileDescriptor
210
211var file_third_party_tink_proto_common_proto_rawDesc = []byte{
212	0x0a, 0x23, 0x74, 0x68, 0x69, 0x72, 0x64, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x2f, 0x74, 0x69,
213	0x6e, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
214	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x72,
215	0x79, 0x70, 0x74, 0x6f, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2a, 0x63, 0x0a, 0x11, 0x45, 0x6c, 0x6c,
216	0x69, 0x70, 0x74, 0x69, 0x63, 0x43, 0x75, 0x72, 0x76, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x11,
217	0x0a, 0x0d, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x43, 0x55, 0x52, 0x56, 0x45, 0x10,
218	0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x49, 0x53, 0x54, 0x5f, 0x50, 0x32, 0x35, 0x36, 0x10, 0x02,
219	0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x49, 0x53, 0x54, 0x5f, 0x50, 0x33, 0x38, 0x34, 0x10, 0x03, 0x12,
220	0x0d, 0x0a, 0x09, 0x4e, 0x49, 0x53, 0x54, 0x5f, 0x50, 0x35, 0x32, 0x31, 0x10, 0x04, 0x12, 0x0e,
221	0x0a, 0x0a, 0x43, 0x55, 0x52, 0x56, 0x45, 0x32, 0x35, 0x35, 0x31, 0x39, 0x10, 0x05, 0x2a, 0x6a,
222	0x0a, 0x0d, 0x45, 0x63, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12,
223	0x12, 0x0a, 0x0e, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41,
224	0x54, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x55, 0x4e, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53,
225	0x53, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53,
226	0x53, 0x45, 0x44, 0x10, 0x02, 0x12, 0x23, 0x0a, 0x1f, 0x44, 0x4f, 0x5f, 0x4e, 0x4f, 0x54, 0x5f,
227	0x55, 0x53, 0x45, 0x5f, 0x43, 0x52, 0x55, 0x4e, 0x43, 0x48, 0x59, 0x5f, 0x55, 0x4e, 0x43, 0x4f,
228	0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x45, 0x44, 0x10, 0x03, 0x2a, 0x56, 0x0a, 0x08, 0x48, 0x61,
229	0x73, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57,
230	0x4e, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x53, 0x48, 0x41, 0x31,
231	0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x48, 0x41, 0x33, 0x38, 0x34, 0x10, 0x02, 0x12, 0x0a,
232	0x0a, 0x06, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x48,
233	0x41, 0x35, 0x31, 0x32, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x48, 0x41, 0x32, 0x32, 0x34,
234	0x10, 0x05, 0x42, 0x51, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
235	0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f,
236	0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
237	0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x74, 0x69, 0x6e, 0x6b, 0x2f, 0x67, 0x6f, 0x2f,
238	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x67, 0x6f, 0x5f,
239	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
240}
241
242var (
243	file_third_party_tink_proto_common_proto_rawDescOnce sync.Once
244	file_third_party_tink_proto_common_proto_rawDescData = file_third_party_tink_proto_common_proto_rawDesc
245)
246
247func file_third_party_tink_proto_common_proto_rawDescGZIP() []byte {
248	file_third_party_tink_proto_common_proto_rawDescOnce.Do(func() {
249		file_third_party_tink_proto_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_third_party_tink_proto_common_proto_rawDescData)
250	})
251	return file_third_party_tink_proto_common_proto_rawDescData
252}
253
254var file_third_party_tink_proto_common_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
255var file_third_party_tink_proto_common_proto_goTypes = []interface{}{
256	(EllipticCurveType)(0), // 0: google.crypto.tink.EllipticCurveType
257	(EcPointFormat)(0),     // 1: google.crypto.tink.EcPointFormat
258	(HashType)(0),          // 2: google.crypto.tink.HashType
259}
260var file_third_party_tink_proto_common_proto_depIdxs = []int32{
261	0, // [0:0] is the sub-list for method output_type
262	0, // [0:0] is the sub-list for method input_type
263	0, // [0:0] is the sub-list for extension type_name
264	0, // [0:0] is the sub-list for extension extendee
265	0, // [0:0] is the sub-list for field type_name
266}
267
268func init() { file_third_party_tink_proto_common_proto_init() }
269func file_third_party_tink_proto_common_proto_init() {
270	if File_third_party_tink_proto_common_proto != nil {
271		return
272	}
273	type x struct{}
274	out := protoimpl.TypeBuilder{
275		File: protoimpl.DescBuilder{
276			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
277			RawDescriptor: file_third_party_tink_proto_common_proto_rawDesc,
278			NumEnums:      3,
279			NumMessages:   0,
280			NumExtensions: 0,
281			NumServices:   0,
282		},
283		GoTypes:           file_third_party_tink_proto_common_proto_goTypes,
284		DependencyIndexes: file_third_party_tink_proto_common_proto_depIdxs,
285		EnumInfos:         file_third_party_tink_proto_common_proto_enumTypes,
286	}.Build()
287	File_third_party_tink_proto_common_proto = out.File
288	file_third_party_tink_proto_common_proto_rawDesc = nil
289	file_third_party_tink_proto_common_proto_goTypes = nil
290	file_third_party_tink_proto_common_proto_depIdxs = nil
291}
292