1// Copyright 2020 Google LLC 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// Code generated by protoc-gen-go. DO NOT EDIT. 18// versions: 19// protoc-gen-go v1.28.1 20// protoc v3.21.12 21// source: third_party/tink/proto/jwt_hmac.proto 22 23package jwt_hmac_go_proto 24 25import ( 26 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 27 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 28 reflect "reflect" 29 sync "sync" 30) 31 32const ( 33 // Verify that this generated code is sufficiently up-to-date. 34 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 35 // Verify that runtime/protoimpl is sufficiently up-to-date. 36 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 37) 38 39// See https://datatracker.ietf.org/doc/html/rfc7518#section-3.2 40type JwtHmacAlgorithm int32 41 42const ( 43 JwtHmacAlgorithm_HS_UNKNOWN JwtHmacAlgorithm = 0 44 JwtHmacAlgorithm_HS256 JwtHmacAlgorithm = 1 // HMAC using SHA-256 45 JwtHmacAlgorithm_HS384 JwtHmacAlgorithm = 2 // HMAC using SHA-384 46 JwtHmacAlgorithm_HS512 JwtHmacAlgorithm = 3 // HMAC using SHA-512 47) 48 49// Enum value maps for JwtHmacAlgorithm. 50var ( 51 JwtHmacAlgorithm_name = map[int32]string{ 52 0: "HS_UNKNOWN", 53 1: "HS256", 54 2: "HS384", 55 3: "HS512", 56 } 57 JwtHmacAlgorithm_value = map[string]int32{ 58 "HS_UNKNOWN": 0, 59 "HS256": 1, 60 "HS384": 2, 61 "HS512": 3, 62 } 63) 64 65func (x JwtHmacAlgorithm) Enum() *JwtHmacAlgorithm { 66 p := new(JwtHmacAlgorithm) 67 *p = x 68 return p 69} 70 71func (x JwtHmacAlgorithm) String() string { 72 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 73} 74 75func (JwtHmacAlgorithm) Descriptor() protoreflect.EnumDescriptor { 76 return file_third_party_tink_proto_jwt_hmac_proto_enumTypes[0].Descriptor() 77} 78 79func (JwtHmacAlgorithm) Type() protoreflect.EnumType { 80 return &file_third_party_tink_proto_jwt_hmac_proto_enumTypes[0] 81} 82 83func (x JwtHmacAlgorithm) Number() protoreflect.EnumNumber { 84 return protoreflect.EnumNumber(x) 85} 86 87// Deprecated: Use JwtHmacAlgorithm.Descriptor instead. 88func (JwtHmacAlgorithm) EnumDescriptor() ([]byte, []int) { 89 return file_third_party_tink_proto_jwt_hmac_proto_rawDescGZIP(), []int{0} 90} 91 92// key_type: type.googleapis.com/google.crypto.tink.JwtHmacKey 93type JwtHmacKey struct { 94 state protoimpl.MessageState 95 sizeCache protoimpl.SizeCache 96 unknownFields protoimpl.UnknownFields 97 98 Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` 99 Algorithm JwtHmacAlgorithm `protobuf:"varint,2,opt,name=algorithm,proto3,enum=google.crypto.tink.JwtHmacAlgorithm" json:"algorithm,omitempty"` 100 KeyValue []byte `protobuf:"bytes,3,opt,name=key_value,json=keyValue,proto3" json:"key_value,omitempty"` 101 CustomKid *JwtHmacKey_CustomKid `protobuf:"bytes,4,opt,name=custom_kid,json=customKid,proto3" json:"custom_kid,omitempty"` 102} 103 104func (x *JwtHmacKey) Reset() { 105 *x = JwtHmacKey{} 106 if protoimpl.UnsafeEnabled { 107 mi := &file_third_party_tink_proto_jwt_hmac_proto_msgTypes[0] 108 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 109 ms.StoreMessageInfo(mi) 110 } 111} 112 113func (x *JwtHmacKey) String() string { 114 return protoimpl.X.MessageStringOf(x) 115} 116 117func (*JwtHmacKey) ProtoMessage() {} 118 119func (x *JwtHmacKey) ProtoReflect() protoreflect.Message { 120 mi := &file_third_party_tink_proto_jwt_hmac_proto_msgTypes[0] 121 if protoimpl.UnsafeEnabled && x != nil { 122 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 123 if ms.LoadMessageInfo() == nil { 124 ms.StoreMessageInfo(mi) 125 } 126 return ms 127 } 128 return mi.MessageOf(x) 129} 130 131// Deprecated: Use JwtHmacKey.ProtoReflect.Descriptor instead. 132func (*JwtHmacKey) Descriptor() ([]byte, []int) { 133 return file_third_party_tink_proto_jwt_hmac_proto_rawDescGZIP(), []int{0} 134} 135 136func (x *JwtHmacKey) GetVersion() uint32 { 137 if x != nil { 138 return x.Version 139 } 140 return 0 141} 142 143func (x *JwtHmacKey) GetAlgorithm() JwtHmacAlgorithm { 144 if x != nil { 145 return x.Algorithm 146 } 147 return JwtHmacAlgorithm_HS_UNKNOWN 148} 149 150func (x *JwtHmacKey) GetKeyValue() []byte { 151 if x != nil { 152 return x.KeyValue 153 } 154 return nil 155} 156 157func (x *JwtHmacKey) GetCustomKid() *JwtHmacKey_CustomKid { 158 if x != nil { 159 return x.CustomKid 160 } 161 return nil 162} 163 164type JwtHmacKeyFormat struct { 165 state protoimpl.MessageState 166 sizeCache protoimpl.SizeCache 167 unknownFields protoimpl.UnknownFields 168 169 Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` 170 Algorithm JwtHmacAlgorithm `protobuf:"varint,2,opt,name=algorithm,proto3,enum=google.crypto.tink.JwtHmacAlgorithm" json:"algorithm,omitempty"` 171 KeySize uint32 `protobuf:"varint,3,opt,name=key_size,json=keySize,proto3" json:"key_size,omitempty"` 172} 173 174func (x *JwtHmacKeyFormat) Reset() { 175 *x = JwtHmacKeyFormat{} 176 if protoimpl.UnsafeEnabled { 177 mi := &file_third_party_tink_proto_jwt_hmac_proto_msgTypes[1] 178 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 179 ms.StoreMessageInfo(mi) 180 } 181} 182 183func (x *JwtHmacKeyFormat) String() string { 184 return protoimpl.X.MessageStringOf(x) 185} 186 187func (*JwtHmacKeyFormat) ProtoMessage() {} 188 189func (x *JwtHmacKeyFormat) ProtoReflect() protoreflect.Message { 190 mi := &file_third_party_tink_proto_jwt_hmac_proto_msgTypes[1] 191 if protoimpl.UnsafeEnabled && x != nil { 192 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 193 if ms.LoadMessageInfo() == nil { 194 ms.StoreMessageInfo(mi) 195 } 196 return ms 197 } 198 return mi.MessageOf(x) 199} 200 201// Deprecated: Use JwtHmacKeyFormat.ProtoReflect.Descriptor instead. 202func (*JwtHmacKeyFormat) Descriptor() ([]byte, []int) { 203 return file_third_party_tink_proto_jwt_hmac_proto_rawDescGZIP(), []int{1} 204} 205 206func (x *JwtHmacKeyFormat) GetVersion() uint32 { 207 if x != nil { 208 return x.Version 209 } 210 return 0 211} 212 213func (x *JwtHmacKeyFormat) GetAlgorithm() JwtHmacAlgorithm { 214 if x != nil { 215 return x.Algorithm 216 } 217 return JwtHmacAlgorithm_HS_UNKNOWN 218} 219 220func (x *JwtHmacKeyFormat) GetKeySize() uint32 { 221 if x != nil { 222 return x.KeySize 223 } 224 return 0 225} 226 227// Optional, custom kid header value to be used with "RAW" keys. 228// "TINK" keys with this value set will be rejected. 229type JwtHmacKey_CustomKid struct { 230 state protoimpl.MessageState 231 sizeCache protoimpl.SizeCache 232 unknownFields protoimpl.UnknownFields 233 234 Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` 235} 236 237func (x *JwtHmacKey_CustomKid) Reset() { 238 *x = JwtHmacKey_CustomKid{} 239 if protoimpl.UnsafeEnabled { 240 mi := &file_third_party_tink_proto_jwt_hmac_proto_msgTypes[2] 241 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 242 ms.StoreMessageInfo(mi) 243 } 244} 245 246func (x *JwtHmacKey_CustomKid) String() string { 247 return protoimpl.X.MessageStringOf(x) 248} 249 250func (*JwtHmacKey_CustomKid) ProtoMessage() {} 251 252func (x *JwtHmacKey_CustomKid) ProtoReflect() protoreflect.Message { 253 mi := &file_third_party_tink_proto_jwt_hmac_proto_msgTypes[2] 254 if protoimpl.UnsafeEnabled && x != nil { 255 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 256 if ms.LoadMessageInfo() == nil { 257 ms.StoreMessageInfo(mi) 258 } 259 return ms 260 } 261 return mi.MessageOf(x) 262} 263 264// Deprecated: Use JwtHmacKey_CustomKid.ProtoReflect.Descriptor instead. 265func (*JwtHmacKey_CustomKid) Descriptor() ([]byte, []int) { 266 return file_third_party_tink_proto_jwt_hmac_proto_rawDescGZIP(), []int{0, 0} 267} 268 269func (x *JwtHmacKey_CustomKid) GetValue() string { 270 if x != nil { 271 return x.Value 272 } 273 return "" 274} 275 276var File_third_party_tink_proto_jwt_hmac_proto protoreflect.FileDescriptor 277 278var file_third_party_tink_proto_jwt_hmac_proto_rawDesc = []byte{ 279 0x0a, 0x25, 0x74, 0x68, 0x69, 0x72, 0x64, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x2f, 0x74, 0x69, 280 0x6e, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6a, 0x77, 0x74, 0x5f, 0x68, 0x6d, 0x61, 281 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 282 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x22, 0xf3, 0x01, 0x0a, 0x0a, 283 0x4a, 0x77, 0x74, 0x48, 0x6d, 0x61, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 284 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 285 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 286 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 287 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x4a, 0x77, 0x74, 288 0x48, 0x6d, 0x61, 0x63, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x52, 0x09, 0x61, 289 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x5f, 290 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6b, 0x65, 0x79, 291 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 292 0x6b, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 293 0x6c, 0x65, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x4a, 294 0x77, 0x74, 0x48, 0x6d, 0x61, 0x63, 0x4b, 0x65, 0x79, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 295 0x4b, 0x69, 0x64, 0x52, 0x09, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4b, 0x69, 0x64, 0x1a, 0x21, 296 0x0a, 0x09, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4b, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x76, 297 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 298 0x65, 0x22, 0x8b, 0x01, 0x0a, 0x10, 0x4a, 0x77, 0x74, 0x48, 0x6d, 0x61, 0x63, 0x4b, 0x65, 0x79, 299 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 300 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 301 0x12, 0x42, 0x0a, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x02, 0x20, 302 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x72, 0x79, 303 0x70, 0x74, 0x6f, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x4a, 0x77, 0x74, 0x48, 0x6d, 0x61, 0x63, 304 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x52, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 305 0x69, 0x74, 0x68, 0x6d, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x69, 0x7a, 0x65, 306 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x53, 0x69, 0x7a, 0x65, 0x2a, 307 0x43, 0x0a, 0x10, 0x4a, 0x77, 0x74, 0x48, 0x6d, 0x61, 0x63, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 308 0x74, 0x68, 0x6d, 0x12, 0x0e, 0x0a, 0x0a, 0x48, 0x53, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 309 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x53, 0x32, 0x35, 0x36, 0x10, 0x01, 0x12, 0x09, 310 0x0a, 0x05, 0x48, 0x53, 0x33, 0x38, 0x34, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x53, 0x35, 311 0x31, 0x32, 0x10, 0x03, 0x42, 0x53, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 312 0x6c, 0x65, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 313 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 314 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x74, 0x69, 0x6e, 0x6b, 0x2f, 0x67, 315 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6a, 0x77, 0x74, 0x5f, 0x68, 0x6d, 0x61, 0x63, 316 0x5f, 0x67, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 317 0x33, 318} 319 320var ( 321 file_third_party_tink_proto_jwt_hmac_proto_rawDescOnce sync.Once 322 file_third_party_tink_proto_jwt_hmac_proto_rawDescData = file_third_party_tink_proto_jwt_hmac_proto_rawDesc 323) 324 325func file_third_party_tink_proto_jwt_hmac_proto_rawDescGZIP() []byte { 326 file_third_party_tink_proto_jwt_hmac_proto_rawDescOnce.Do(func() { 327 file_third_party_tink_proto_jwt_hmac_proto_rawDescData = protoimpl.X.CompressGZIP(file_third_party_tink_proto_jwt_hmac_proto_rawDescData) 328 }) 329 return file_third_party_tink_proto_jwt_hmac_proto_rawDescData 330} 331 332var file_third_party_tink_proto_jwt_hmac_proto_enumTypes = make([]protoimpl.EnumInfo, 1) 333var file_third_party_tink_proto_jwt_hmac_proto_msgTypes = make([]protoimpl.MessageInfo, 3) 334var file_third_party_tink_proto_jwt_hmac_proto_goTypes = []interface{}{ 335 (JwtHmacAlgorithm)(0), // 0: google.crypto.tink.JwtHmacAlgorithm 336 (*JwtHmacKey)(nil), // 1: google.crypto.tink.JwtHmacKey 337 (*JwtHmacKeyFormat)(nil), // 2: google.crypto.tink.JwtHmacKeyFormat 338 (*JwtHmacKey_CustomKid)(nil), // 3: google.crypto.tink.JwtHmacKey.CustomKid 339} 340var file_third_party_tink_proto_jwt_hmac_proto_depIdxs = []int32{ 341 0, // 0: google.crypto.tink.JwtHmacKey.algorithm:type_name -> google.crypto.tink.JwtHmacAlgorithm 342 3, // 1: google.crypto.tink.JwtHmacKey.custom_kid:type_name -> google.crypto.tink.JwtHmacKey.CustomKid 343 0, // 2: google.crypto.tink.JwtHmacKeyFormat.algorithm:type_name -> google.crypto.tink.JwtHmacAlgorithm 344 3, // [3:3] is the sub-list for method output_type 345 3, // [3:3] is the sub-list for method input_type 346 3, // [3:3] is the sub-list for extension type_name 347 3, // [3:3] is the sub-list for extension extendee 348 0, // [0:3] is the sub-list for field type_name 349} 350 351func init() { file_third_party_tink_proto_jwt_hmac_proto_init() } 352func file_third_party_tink_proto_jwt_hmac_proto_init() { 353 if File_third_party_tink_proto_jwt_hmac_proto != nil { 354 return 355 } 356 if !protoimpl.UnsafeEnabled { 357 file_third_party_tink_proto_jwt_hmac_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 358 switch v := v.(*JwtHmacKey); i { 359 case 0: 360 return &v.state 361 case 1: 362 return &v.sizeCache 363 case 2: 364 return &v.unknownFields 365 default: 366 return nil 367 } 368 } 369 file_third_party_tink_proto_jwt_hmac_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 370 switch v := v.(*JwtHmacKeyFormat); i { 371 case 0: 372 return &v.state 373 case 1: 374 return &v.sizeCache 375 case 2: 376 return &v.unknownFields 377 default: 378 return nil 379 } 380 } 381 file_third_party_tink_proto_jwt_hmac_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { 382 switch v := v.(*JwtHmacKey_CustomKid); i { 383 case 0: 384 return &v.state 385 case 1: 386 return &v.sizeCache 387 case 2: 388 return &v.unknownFields 389 default: 390 return nil 391 } 392 } 393 } 394 type x struct{} 395 out := protoimpl.TypeBuilder{ 396 File: protoimpl.DescBuilder{ 397 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 398 RawDescriptor: file_third_party_tink_proto_jwt_hmac_proto_rawDesc, 399 NumEnums: 1, 400 NumMessages: 3, 401 NumExtensions: 0, 402 NumServices: 0, 403 }, 404 GoTypes: file_third_party_tink_proto_jwt_hmac_proto_goTypes, 405 DependencyIndexes: file_third_party_tink_proto_jwt_hmac_proto_depIdxs, 406 EnumInfos: file_third_party_tink_proto_jwt_hmac_proto_enumTypes, 407 MessageInfos: file_third_party_tink_proto_jwt_hmac_proto_msgTypes, 408 }.Build() 409 File_third_party_tink_proto_jwt_hmac_proto = out.File 410 file_third_party_tink_proto_jwt_hmac_proto_rawDesc = nil 411 file_third_party_tink_proto_jwt_hmac_proto_goTypes = nil 412 file_third_party_tink_proto_jwt_hmac_proto_depIdxs = nil 413} 414