github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/ccl/storageccl/engineccl/enginepbccl/key_registry.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: ccl/storageccl/engineccl/enginepbccl/key_registry.proto 3 4 package enginepbccl 5 6 import proto "github.com/gogo/protobuf/proto" 7 import fmt "fmt" 8 import math "math" 9 10 import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" 11 12 import io "io" 13 14 // Reference imports to suppress errors if they are not otherwise used. 15 var _ = proto.Marshal 16 var _ = fmt.Errorf 17 var _ = math.Inf 18 19 // This is a compile-time assertion to ensure that this generated file 20 // is compatible with the proto package it is being compiled against. 21 // A compilation error at this line likely means your copy of the 22 // proto package needs to be updated. 23 const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package 24 25 type EncryptionType int32 26 27 const ( 28 // No encryption. 29 EncryptionType_Plaintext EncryptionType = 0 30 // AES in counter mode with various key lengths. 31 EncryptionType_AES128_CTR EncryptionType = 1 32 EncryptionType_AES192_CTR EncryptionType = 2 33 EncryptionType_AES256_CTR EncryptionType = 3 34 ) 35 36 var EncryptionType_name = map[int32]string{ 37 0: "Plaintext", 38 1: "AES128_CTR", 39 2: "AES192_CTR", 40 3: "AES256_CTR", 41 } 42 var EncryptionType_value = map[string]int32{ 43 "Plaintext": 0, 44 "AES128_CTR": 1, 45 "AES192_CTR": 2, 46 "AES256_CTR": 3, 47 } 48 49 func (x EncryptionType) String() string { 50 return proto.EnumName(EncryptionType_name, int32(x)) 51 } 52 func (EncryptionType) EnumDescriptor() ([]byte, []int) { 53 return fileDescriptor_key_registry_cc37749f10f852e8, []int{0} 54 } 55 56 // DataKeysRegistry contains all data keys (including the raw key) as well 57 // as store key information (excluding raw key). 58 // This is written to disk. 59 type DataKeysRegistry struct { 60 // Map of key_id to KeyInfo (raw key is not included). 61 StoreKeys map[string]*KeyInfo `protobuf:"bytes,1,rep,name=store_keys,json=storeKeys,proto3" json:"store_keys,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 62 // Map of key_id to SecretKey (raw key is included). 63 DataKeys map[string]*SecretKey `protobuf:"bytes,2,rep,name=data_keys,json=dataKeys,proto3" json:"data_keys,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 64 // Active key IDs. Empty means no keys loaded yet. 65 ActiveStoreKeyId string `protobuf:"bytes,3,opt,name=active_store_key_id,json=activeStoreKeyId,proto3" json:"active_store_key_id,omitempty"` 66 ActiveDataKeyId string `protobuf:"bytes,4,opt,name=active_data_key_id,json=activeDataKeyId,proto3" json:"active_data_key_id,omitempty"` 67 } 68 69 func (m *DataKeysRegistry) Reset() { *m = DataKeysRegistry{} } 70 func (m *DataKeysRegistry) String() string { return proto.CompactTextString(m) } 71 func (*DataKeysRegistry) ProtoMessage() {} 72 func (*DataKeysRegistry) Descriptor() ([]byte, []int) { 73 return fileDescriptor_key_registry_cc37749f10f852e8, []int{0} 74 } 75 func (m *DataKeysRegistry) XXX_Unmarshal(b []byte) error { 76 return m.Unmarshal(b) 77 } 78 func (m *DataKeysRegistry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 79 b = b[:cap(b)] 80 n, err := m.MarshalTo(b) 81 if err != nil { 82 return nil, err 83 } 84 return b[:n], nil 85 } 86 func (dst *DataKeysRegistry) XXX_Merge(src proto.Message) { 87 xxx_messageInfo_DataKeysRegistry.Merge(dst, src) 88 } 89 func (m *DataKeysRegistry) XXX_Size() int { 90 return m.Size() 91 } 92 func (m *DataKeysRegistry) XXX_DiscardUnknown() { 93 xxx_messageInfo_DataKeysRegistry.DiscardUnknown(m) 94 } 95 96 var xxx_messageInfo_DataKeysRegistry proto.InternalMessageInfo 97 98 // KeyInfo contains information about the key, but not the key itself. 99 // This is safe to pass around, log, and store. 100 type KeyInfo struct { 101 // EncryptionType is the type of encryption (aka: cipher) used with this key. 102 EncryptionType EncryptionType `protobuf:"varint,1,opt,name=encryption_type,json=encryptionType,proto3,enum=cockroach.ccl.storageccl.engineccl.enginepbccl.EncryptionType" json:"encryption_type,omitempty"` 103 // The ID (hash) of this key. 104 KeyId string `protobuf:"bytes,2,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` 105 // First time this key was seen (in seconds since epoch). 106 CreationTime int64 `protobuf:"varint,3,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"` 107 // Source is a description of the source. This could be a filename, 108 // or the key manager that made the key. eg: "data key manager". 109 Source string `protobuf:"bytes,4,opt,name=source,proto3" json:"source,omitempty"` 110 // Was exposed is true if we ever wrote the key in plaintext. 111 // This does not apply to store keys, only data keys. 112 WasExposed bool `protobuf:"varint,5,opt,name=was_exposed,json=wasExposed,proto3" json:"was_exposed,omitempty"` 113 // ID of the key that caused this key to be created. 114 ParentKeyId string `protobuf:"bytes,6,opt,name=parent_key_id,json=parentKeyId,proto3" json:"parent_key_id,omitempty"` 115 } 116 117 func (m *KeyInfo) Reset() { *m = KeyInfo{} } 118 func (m *KeyInfo) String() string { return proto.CompactTextString(m) } 119 func (*KeyInfo) ProtoMessage() {} 120 func (*KeyInfo) Descriptor() ([]byte, []int) { 121 return fileDescriptor_key_registry_cc37749f10f852e8, []int{1} 122 } 123 func (m *KeyInfo) XXX_Unmarshal(b []byte) error { 124 return m.Unmarshal(b) 125 } 126 func (m *KeyInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 127 b = b[:cap(b)] 128 n, err := m.MarshalTo(b) 129 if err != nil { 130 return nil, err 131 } 132 return b[:n], nil 133 } 134 func (dst *KeyInfo) XXX_Merge(src proto.Message) { 135 xxx_messageInfo_KeyInfo.Merge(dst, src) 136 } 137 func (m *KeyInfo) XXX_Size() int { 138 return m.Size() 139 } 140 func (m *KeyInfo) XXX_DiscardUnknown() { 141 xxx_messageInfo_KeyInfo.DiscardUnknown(m) 142 } 143 144 var xxx_messageInfo_KeyInfo proto.InternalMessageInfo 145 146 // SecretKey contains the information about the key AND the raw key itself. 147 // This should never be logged, displayed, or stored outside of the key registry. 148 // The name is intended to make users of the key wary of the usage. 149 type SecretKey struct { 150 Info *KeyInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` 151 // The raw key. 152 Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` 153 } 154 155 func (m *SecretKey) Reset() { *m = SecretKey{} } 156 func (m *SecretKey) String() string { return proto.CompactTextString(m) } 157 func (*SecretKey) ProtoMessage() {} 158 func (*SecretKey) Descriptor() ([]byte, []int) { 159 return fileDescriptor_key_registry_cc37749f10f852e8, []int{2} 160 } 161 func (m *SecretKey) XXX_Unmarshal(b []byte) error { 162 return m.Unmarshal(b) 163 } 164 func (m *SecretKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 165 b = b[:cap(b)] 166 n, err := m.MarshalTo(b) 167 if err != nil { 168 return nil, err 169 } 170 return b[:n], nil 171 } 172 func (dst *SecretKey) XXX_Merge(src proto.Message) { 173 xxx_messageInfo_SecretKey.Merge(dst, src) 174 } 175 func (m *SecretKey) XXX_Size() int { 176 return m.Size() 177 } 178 func (m *SecretKey) XXX_DiscardUnknown() { 179 xxx_messageInfo_SecretKey.DiscardUnknown(m) 180 } 181 182 var xxx_messageInfo_SecretKey proto.InternalMessageInfo 183 184 // EncryptionSettings describes the encryption settings for a file. 185 // This is stored as a protobuf.Any inside the FileEntry as described in: 186 // pkg/storage/enginepb/file_registry.proto 187 type EncryptionSettings struct { 188 EncryptionType EncryptionType `protobuf:"varint,1,opt,name=encryption_type,json=encryptionType,proto3,enum=cockroach.ccl.storageccl.engineccl.enginepbccl.EncryptionType" json:"encryption_type,omitempty"` 189 // Fields for AES-CTR. Empty when encryption_type = Plaintext. 190 KeyId string `protobuf:"bytes,2,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` 191 // len(nonce) + sizeof(counter) should add up to AES_Blocksize (128 bits). 192 Nonce []byte `protobuf:"bytes,3,opt,name=nonce,proto3" json:"nonce,omitempty"` 193 Counter uint32 `protobuf:"varint,4,opt,name=counter,proto3" json:"counter,omitempty"` 194 } 195 196 func (m *EncryptionSettings) Reset() { *m = EncryptionSettings{} } 197 func (m *EncryptionSettings) String() string { return proto.CompactTextString(m) } 198 func (*EncryptionSettings) ProtoMessage() {} 199 func (*EncryptionSettings) Descriptor() ([]byte, []int) { 200 return fileDescriptor_key_registry_cc37749f10f852e8, []int{3} 201 } 202 func (m *EncryptionSettings) XXX_Unmarshal(b []byte) error { 203 return m.Unmarshal(b) 204 } 205 func (m *EncryptionSettings) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 206 b = b[:cap(b)] 207 n, err := m.MarshalTo(b) 208 if err != nil { 209 return nil, err 210 } 211 return b[:n], nil 212 } 213 func (dst *EncryptionSettings) XXX_Merge(src proto.Message) { 214 xxx_messageInfo_EncryptionSettings.Merge(dst, src) 215 } 216 func (m *EncryptionSettings) XXX_Size() int { 217 return m.Size() 218 } 219 func (m *EncryptionSettings) XXX_DiscardUnknown() { 220 xxx_messageInfo_EncryptionSettings.DiscardUnknown(m) 221 } 222 223 var xxx_messageInfo_EncryptionSettings proto.InternalMessageInfo 224 225 func init() { 226 proto.RegisterType((*DataKeysRegistry)(nil), "cockroach.ccl.storageccl.engineccl.enginepbccl.DataKeysRegistry") 227 proto.RegisterMapType((map[string]*SecretKey)(nil), "cockroach.ccl.storageccl.engineccl.enginepbccl.DataKeysRegistry.DataKeysEntry") 228 proto.RegisterMapType((map[string]*KeyInfo)(nil), "cockroach.ccl.storageccl.engineccl.enginepbccl.DataKeysRegistry.StoreKeysEntry") 229 proto.RegisterType((*KeyInfo)(nil), "cockroach.ccl.storageccl.engineccl.enginepbccl.KeyInfo") 230 proto.RegisterType((*SecretKey)(nil), "cockroach.ccl.storageccl.engineccl.enginepbccl.SecretKey") 231 proto.RegisterType((*EncryptionSettings)(nil), "cockroach.ccl.storageccl.engineccl.enginepbccl.EncryptionSettings") 232 proto.RegisterEnum("cockroach.ccl.storageccl.engineccl.enginepbccl.EncryptionType", EncryptionType_name, EncryptionType_value) 233 } 234 func (m *DataKeysRegistry) Marshal() (dAtA []byte, err error) { 235 size := m.Size() 236 dAtA = make([]byte, size) 237 n, err := m.MarshalTo(dAtA) 238 if err != nil { 239 return nil, err 240 } 241 return dAtA[:n], nil 242 } 243 244 func (m *DataKeysRegistry) MarshalTo(dAtA []byte) (int, error) { 245 var i int 246 _ = i 247 var l int 248 _ = l 249 if len(m.StoreKeys) > 0 { 250 keysForStoreKeys := make([]string, 0, len(m.StoreKeys)) 251 for k := range m.StoreKeys { 252 keysForStoreKeys = append(keysForStoreKeys, string(k)) 253 } 254 github_com_gogo_protobuf_sortkeys.Strings(keysForStoreKeys) 255 for _, k := range keysForStoreKeys { 256 dAtA[i] = 0xa 257 i++ 258 v := m.StoreKeys[string(k)] 259 msgSize := 0 260 if v != nil { 261 msgSize = v.Size() 262 msgSize += 1 + sovKeyRegistry(uint64(msgSize)) 263 } 264 mapSize := 1 + len(k) + sovKeyRegistry(uint64(len(k))) + msgSize 265 i = encodeVarintKeyRegistry(dAtA, i, uint64(mapSize)) 266 dAtA[i] = 0xa 267 i++ 268 i = encodeVarintKeyRegistry(dAtA, i, uint64(len(k))) 269 i += copy(dAtA[i:], k) 270 if v != nil { 271 dAtA[i] = 0x12 272 i++ 273 i = encodeVarintKeyRegistry(dAtA, i, uint64(v.Size())) 274 n1, err := v.MarshalTo(dAtA[i:]) 275 if err != nil { 276 return 0, err 277 } 278 i += n1 279 } 280 } 281 } 282 if len(m.DataKeys) > 0 { 283 keysForDataKeys := make([]string, 0, len(m.DataKeys)) 284 for k := range m.DataKeys { 285 keysForDataKeys = append(keysForDataKeys, string(k)) 286 } 287 github_com_gogo_protobuf_sortkeys.Strings(keysForDataKeys) 288 for _, k := range keysForDataKeys { 289 dAtA[i] = 0x12 290 i++ 291 v := m.DataKeys[string(k)] 292 msgSize := 0 293 if v != nil { 294 msgSize = v.Size() 295 msgSize += 1 + sovKeyRegistry(uint64(msgSize)) 296 } 297 mapSize := 1 + len(k) + sovKeyRegistry(uint64(len(k))) + msgSize 298 i = encodeVarintKeyRegistry(dAtA, i, uint64(mapSize)) 299 dAtA[i] = 0xa 300 i++ 301 i = encodeVarintKeyRegistry(dAtA, i, uint64(len(k))) 302 i += copy(dAtA[i:], k) 303 if v != nil { 304 dAtA[i] = 0x12 305 i++ 306 i = encodeVarintKeyRegistry(dAtA, i, uint64(v.Size())) 307 n2, err := v.MarshalTo(dAtA[i:]) 308 if err != nil { 309 return 0, err 310 } 311 i += n2 312 } 313 } 314 } 315 if len(m.ActiveStoreKeyId) > 0 { 316 dAtA[i] = 0x1a 317 i++ 318 i = encodeVarintKeyRegistry(dAtA, i, uint64(len(m.ActiveStoreKeyId))) 319 i += copy(dAtA[i:], m.ActiveStoreKeyId) 320 } 321 if len(m.ActiveDataKeyId) > 0 { 322 dAtA[i] = 0x22 323 i++ 324 i = encodeVarintKeyRegistry(dAtA, i, uint64(len(m.ActiveDataKeyId))) 325 i += copy(dAtA[i:], m.ActiveDataKeyId) 326 } 327 return i, nil 328 } 329 330 func (m *KeyInfo) Marshal() (dAtA []byte, err error) { 331 size := m.Size() 332 dAtA = make([]byte, size) 333 n, err := m.MarshalTo(dAtA) 334 if err != nil { 335 return nil, err 336 } 337 return dAtA[:n], nil 338 } 339 340 func (m *KeyInfo) MarshalTo(dAtA []byte) (int, error) { 341 var i int 342 _ = i 343 var l int 344 _ = l 345 if m.EncryptionType != 0 { 346 dAtA[i] = 0x8 347 i++ 348 i = encodeVarintKeyRegistry(dAtA, i, uint64(m.EncryptionType)) 349 } 350 if len(m.KeyId) > 0 { 351 dAtA[i] = 0x12 352 i++ 353 i = encodeVarintKeyRegistry(dAtA, i, uint64(len(m.KeyId))) 354 i += copy(dAtA[i:], m.KeyId) 355 } 356 if m.CreationTime != 0 { 357 dAtA[i] = 0x18 358 i++ 359 i = encodeVarintKeyRegistry(dAtA, i, uint64(m.CreationTime)) 360 } 361 if len(m.Source) > 0 { 362 dAtA[i] = 0x22 363 i++ 364 i = encodeVarintKeyRegistry(dAtA, i, uint64(len(m.Source))) 365 i += copy(dAtA[i:], m.Source) 366 } 367 if m.WasExposed { 368 dAtA[i] = 0x28 369 i++ 370 if m.WasExposed { 371 dAtA[i] = 1 372 } else { 373 dAtA[i] = 0 374 } 375 i++ 376 } 377 if len(m.ParentKeyId) > 0 { 378 dAtA[i] = 0x32 379 i++ 380 i = encodeVarintKeyRegistry(dAtA, i, uint64(len(m.ParentKeyId))) 381 i += copy(dAtA[i:], m.ParentKeyId) 382 } 383 return i, nil 384 } 385 386 func (m *SecretKey) Marshal() (dAtA []byte, err error) { 387 size := m.Size() 388 dAtA = make([]byte, size) 389 n, err := m.MarshalTo(dAtA) 390 if err != nil { 391 return nil, err 392 } 393 return dAtA[:n], nil 394 } 395 396 func (m *SecretKey) MarshalTo(dAtA []byte) (int, error) { 397 var i int 398 _ = i 399 var l int 400 _ = l 401 if m.Info != nil { 402 dAtA[i] = 0xa 403 i++ 404 i = encodeVarintKeyRegistry(dAtA, i, uint64(m.Info.Size())) 405 n3, err := m.Info.MarshalTo(dAtA[i:]) 406 if err != nil { 407 return 0, err 408 } 409 i += n3 410 } 411 if len(m.Key) > 0 { 412 dAtA[i] = 0x12 413 i++ 414 i = encodeVarintKeyRegistry(dAtA, i, uint64(len(m.Key))) 415 i += copy(dAtA[i:], m.Key) 416 } 417 return i, nil 418 } 419 420 func (m *EncryptionSettings) Marshal() (dAtA []byte, err error) { 421 size := m.Size() 422 dAtA = make([]byte, size) 423 n, err := m.MarshalTo(dAtA) 424 if err != nil { 425 return nil, err 426 } 427 return dAtA[:n], nil 428 } 429 430 func (m *EncryptionSettings) MarshalTo(dAtA []byte) (int, error) { 431 var i int 432 _ = i 433 var l int 434 _ = l 435 if m.EncryptionType != 0 { 436 dAtA[i] = 0x8 437 i++ 438 i = encodeVarintKeyRegistry(dAtA, i, uint64(m.EncryptionType)) 439 } 440 if len(m.KeyId) > 0 { 441 dAtA[i] = 0x12 442 i++ 443 i = encodeVarintKeyRegistry(dAtA, i, uint64(len(m.KeyId))) 444 i += copy(dAtA[i:], m.KeyId) 445 } 446 if len(m.Nonce) > 0 { 447 dAtA[i] = 0x1a 448 i++ 449 i = encodeVarintKeyRegistry(dAtA, i, uint64(len(m.Nonce))) 450 i += copy(dAtA[i:], m.Nonce) 451 } 452 if m.Counter != 0 { 453 dAtA[i] = 0x20 454 i++ 455 i = encodeVarintKeyRegistry(dAtA, i, uint64(m.Counter)) 456 } 457 return i, nil 458 } 459 460 func encodeVarintKeyRegistry(dAtA []byte, offset int, v uint64) int { 461 for v >= 1<<7 { 462 dAtA[offset] = uint8(v&0x7f | 0x80) 463 v >>= 7 464 offset++ 465 } 466 dAtA[offset] = uint8(v) 467 return offset + 1 468 } 469 func (m *DataKeysRegistry) Size() (n int) { 470 if m == nil { 471 return 0 472 } 473 var l int 474 _ = l 475 if len(m.StoreKeys) > 0 { 476 for k, v := range m.StoreKeys { 477 _ = k 478 _ = v 479 l = 0 480 if v != nil { 481 l = v.Size() 482 l += 1 + sovKeyRegistry(uint64(l)) 483 } 484 mapEntrySize := 1 + len(k) + sovKeyRegistry(uint64(len(k))) + l 485 n += mapEntrySize + 1 + sovKeyRegistry(uint64(mapEntrySize)) 486 } 487 } 488 if len(m.DataKeys) > 0 { 489 for k, v := range m.DataKeys { 490 _ = k 491 _ = v 492 l = 0 493 if v != nil { 494 l = v.Size() 495 l += 1 + sovKeyRegistry(uint64(l)) 496 } 497 mapEntrySize := 1 + len(k) + sovKeyRegistry(uint64(len(k))) + l 498 n += mapEntrySize + 1 + sovKeyRegistry(uint64(mapEntrySize)) 499 } 500 } 501 l = len(m.ActiveStoreKeyId) 502 if l > 0 { 503 n += 1 + l + sovKeyRegistry(uint64(l)) 504 } 505 l = len(m.ActiveDataKeyId) 506 if l > 0 { 507 n += 1 + l + sovKeyRegistry(uint64(l)) 508 } 509 return n 510 } 511 512 func (m *KeyInfo) Size() (n int) { 513 if m == nil { 514 return 0 515 } 516 var l int 517 _ = l 518 if m.EncryptionType != 0 { 519 n += 1 + sovKeyRegistry(uint64(m.EncryptionType)) 520 } 521 l = len(m.KeyId) 522 if l > 0 { 523 n += 1 + l + sovKeyRegistry(uint64(l)) 524 } 525 if m.CreationTime != 0 { 526 n += 1 + sovKeyRegistry(uint64(m.CreationTime)) 527 } 528 l = len(m.Source) 529 if l > 0 { 530 n += 1 + l + sovKeyRegistry(uint64(l)) 531 } 532 if m.WasExposed { 533 n += 2 534 } 535 l = len(m.ParentKeyId) 536 if l > 0 { 537 n += 1 + l + sovKeyRegistry(uint64(l)) 538 } 539 return n 540 } 541 542 func (m *SecretKey) Size() (n int) { 543 if m == nil { 544 return 0 545 } 546 var l int 547 _ = l 548 if m.Info != nil { 549 l = m.Info.Size() 550 n += 1 + l + sovKeyRegistry(uint64(l)) 551 } 552 l = len(m.Key) 553 if l > 0 { 554 n += 1 + l + sovKeyRegistry(uint64(l)) 555 } 556 return n 557 } 558 559 func (m *EncryptionSettings) Size() (n int) { 560 if m == nil { 561 return 0 562 } 563 var l int 564 _ = l 565 if m.EncryptionType != 0 { 566 n += 1 + sovKeyRegistry(uint64(m.EncryptionType)) 567 } 568 l = len(m.KeyId) 569 if l > 0 { 570 n += 1 + l + sovKeyRegistry(uint64(l)) 571 } 572 l = len(m.Nonce) 573 if l > 0 { 574 n += 1 + l + sovKeyRegistry(uint64(l)) 575 } 576 if m.Counter != 0 { 577 n += 1 + sovKeyRegistry(uint64(m.Counter)) 578 } 579 return n 580 } 581 582 func sovKeyRegistry(x uint64) (n int) { 583 for { 584 n++ 585 x >>= 7 586 if x == 0 { 587 break 588 } 589 } 590 return n 591 } 592 func sozKeyRegistry(x uint64) (n int) { 593 return sovKeyRegistry(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 594 } 595 func (m *DataKeysRegistry) Unmarshal(dAtA []byte) error { 596 l := len(dAtA) 597 iNdEx := 0 598 for iNdEx < l { 599 preIndex := iNdEx 600 var wire uint64 601 for shift := uint(0); ; shift += 7 { 602 if shift >= 64 { 603 return ErrIntOverflowKeyRegistry 604 } 605 if iNdEx >= l { 606 return io.ErrUnexpectedEOF 607 } 608 b := dAtA[iNdEx] 609 iNdEx++ 610 wire |= (uint64(b) & 0x7F) << shift 611 if b < 0x80 { 612 break 613 } 614 } 615 fieldNum := int32(wire >> 3) 616 wireType := int(wire & 0x7) 617 if wireType == 4 { 618 return fmt.Errorf("proto: DataKeysRegistry: wiretype end group for non-group") 619 } 620 if fieldNum <= 0 { 621 return fmt.Errorf("proto: DataKeysRegistry: illegal tag %d (wire type %d)", fieldNum, wire) 622 } 623 switch fieldNum { 624 case 1: 625 if wireType != 2 { 626 return fmt.Errorf("proto: wrong wireType = %d for field StoreKeys", wireType) 627 } 628 var msglen int 629 for shift := uint(0); ; shift += 7 { 630 if shift >= 64 { 631 return ErrIntOverflowKeyRegistry 632 } 633 if iNdEx >= l { 634 return io.ErrUnexpectedEOF 635 } 636 b := dAtA[iNdEx] 637 iNdEx++ 638 msglen |= (int(b) & 0x7F) << shift 639 if b < 0x80 { 640 break 641 } 642 } 643 if msglen < 0 { 644 return ErrInvalidLengthKeyRegistry 645 } 646 postIndex := iNdEx + msglen 647 if postIndex > l { 648 return io.ErrUnexpectedEOF 649 } 650 if m.StoreKeys == nil { 651 m.StoreKeys = make(map[string]*KeyInfo) 652 } 653 var mapkey string 654 var mapvalue *KeyInfo 655 for iNdEx < postIndex { 656 entryPreIndex := iNdEx 657 var wire uint64 658 for shift := uint(0); ; shift += 7 { 659 if shift >= 64 { 660 return ErrIntOverflowKeyRegistry 661 } 662 if iNdEx >= l { 663 return io.ErrUnexpectedEOF 664 } 665 b := dAtA[iNdEx] 666 iNdEx++ 667 wire |= (uint64(b) & 0x7F) << shift 668 if b < 0x80 { 669 break 670 } 671 } 672 fieldNum := int32(wire >> 3) 673 if fieldNum == 1 { 674 var stringLenmapkey uint64 675 for shift := uint(0); ; shift += 7 { 676 if shift >= 64 { 677 return ErrIntOverflowKeyRegistry 678 } 679 if iNdEx >= l { 680 return io.ErrUnexpectedEOF 681 } 682 b := dAtA[iNdEx] 683 iNdEx++ 684 stringLenmapkey |= (uint64(b) & 0x7F) << shift 685 if b < 0x80 { 686 break 687 } 688 } 689 intStringLenmapkey := int(stringLenmapkey) 690 if intStringLenmapkey < 0 { 691 return ErrInvalidLengthKeyRegistry 692 } 693 postStringIndexmapkey := iNdEx + intStringLenmapkey 694 if postStringIndexmapkey > l { 695 return io.ErrUnexpectedEOF 696 } 697 mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) 698 iNdEx = postStringIndexmapkey 699 } else if fieldNum == 2 { 700 var mapmsglen int 701 for shift := uint(0); ; shift += 7 { 702 if shift >= 64 { 703 return ErrIntOverflowKeyRegistry 704 } 705 if iNdEx >= l { 706 return io.ErrUnexpectedEOF 707 } 708 b := dAtA[iNdEx] 709 iNdEx++ 710 mapmsglen |= (int(b) & 0x7F) << shift 711 if b < 0x80 { 712 break 713 } 714 } 715 if mapmsglen < 0 { 716 return ErrInvalidLengthKeyRegistry 717 } 718 postmsgIndex := iNdEx + mapmsglen 719 if mapmsglen < 0 { 720 return ErrInvalidLengthKeyRegistry 721 } 722 if postmsgIndex > l { 723 return io.ErrUnexpectedEOF 724 } 725 mapvalue = &KeyInfo{} 726 if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { 727 return err 728 } 729 iNdEx = postmsgIndex 730 } else { 731 iNdEx = entryPreIndex 732 skippy, err := skipKeyRegistry(dAtA[iNdEx:]) 733 if err != nil { 734 return err 735 } 736 if skippy < 0 { 737 return ErrInvalidLengthKeyRegistry 738 } 739 if (iNdEx + skippy) > postIndex { 740 return io.ErrUnexpectedEOF 741 } 742 iNdEx += skippy 743 } 744 } 745 m.StoreKeys[mapkey] = mapvalue 746 iNdEx = postIndex 747 case 2: 748 if wireType != 2 { 749 return fmt.Errorf("proto: wrong wireType = %d for field DataKeys", wireType) 750 } 751 var msglen int 752 for shift := uint(0); ; shift += 7 { 753 if shift >= 64 { 754 return ErrIntOverflowKeyRegistry 755 } 756 if iNdEx >= l { 757 return io.ErrUnexpectedEOF 758 } 759 b := dAtA[iNdEx] 760 iNdEx++ 761 msglen |= (int(b) & 0x7F) << shift 762 if b < 0x80 { 763 break 764 } 765 } 766 if msglen < 0 { 767 return ErrInvalidLengthKeyRegistry 768 } 769 postIndex := iNdEx + msglen 770 if postIndex > l { 771 return io.ErrUnexpectedEOF 772 } 773 if m.DataKeys == nil { 774 m.DataKeys = make(map[string]*SecretKey) 775 } 776 var mapkey string 777 var mapvalue *SecretKey 778 for iNdEx < postIndex { 779 entryPreIndex := iNdEx 780 var wire uint64 781 for shift := uint(0); ; shift += 7 { 782 if shift >= 64 { 783 return ErrIntOverflowKeyRegistry 784 } 785 if iNdEx >= l { 786 return io.ErrUnexpectedEOF 787 } 788 b := dAtA[iNdEx] 789 iNdEx++ 790 wire |= (uint64(b) & 0x7F) << shift 791 if b < 0x80 { 792 break 793 } 794 } 795 fieldNum := int32(wire >> 3) 796 if fieldNum == 1 { 797 var stringLenmapkey uint64 798 for shift := uint(0); ; shift += 7 { 799 if shift >= 64 { 800 return ErrIntOverflowKeyRegistry 801 } 802 if iNdEx >= l { 803 return io.ErrUnexpectedEOF 804 } 805 b := dAtA[iNdEx] 806 iNdEx++ 807 stringLenmapkey |= (uint64(b) & 0x7F) << shift 808 if b < 0x80 { 809 break 810 } 811 } 812 intStringLenmapkey := int(stringLenmapkey) 813 if intStringLenmapkey < 0 { 814 return ErrInvalidLengthKeyRegistry 815 } 816 postStringIndexmapkey := iNdEx + intStringLenmapkey 817 if postStringIndexmapkey > l { 818 return io.ErrUnexpectedEOF 819 } 820 mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) 821 iNdEx = postStringIndexmapkey 822 } else if fieldNum == 2 { 823 var mapmsglen int 824 for shift := uint(0); ; shift += 7 { 825 if shift >= 64 { 826 return ErrIntOverflowKeyRegistry 827 } 828 if iNdEx >= l { 829 return io.ErrUnexpectedEOF 830 } 831 b := dAtA[iNdEx] 832 iNdEx++ 833 mapmsglen |= (int(b) & 0x7F) << shift 834 if b < 0x80 { 835 break 836 } 837 } 838 if mapmsglen < 0 { 839 return ErrInvalidLengthKeyRegistry 840 } 841 postmsgIndex := iNdEx + mapmsglen 842 if mapmsglen < 0 { 843 return ErrInvalidLengthKeyRegistry 844 } 845 if postmsgIndex > l { 846 return io.ErrUnexpectedEOF 847 } 848 mapvalue = &SecretKey{} 849 if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { 850 return err 851 } 852 iNdEx = postmsgIndex 853 } else { 854 iNdEx = entryPreIndex 855 skippy, err := skipKeyRegistry(dAtA[iNdEx:]) 856 if err != nil { 857 return err 858 } 859 if skippy < 0 { 860 return ErrInvalidLengthKeyRegistry 861 } 862 if (iNdEx + skippy) > postIndex { 863 return io.ErrUnexpectedEOF 864 } 865 iNdEx += skippy 866 } 867 } 868 m.DataKeys[mapkey] = mapvalue 869 iNdEx = postIndex 870 case 3: 871 if wireType != 2 { 872 return fmt.Errorf("proto: wrong wireType = %d for field ActiveStoreKeyId", wireType) 873 } 874 var stringLen uint64 875 for shift := uint(0); ; shift += 7 { 876 if shift >= 64 { 877 return ErrIntOverflowKeyRegistry 878 } 879 if iNdEx >= l { 880 return io.ErrUnexpectedEOF 881 } 882 b := dAtA[iNdEx] 883 iNdEx++ 884 stringLen |= (uint64(b) & 0x7F) << shift 885 if b < 0x80 { 886 break 887 } 888 } 889 intStringLen := int(stringLen) 890 if intStringLen < 0 { 891 return ErrInvalidLengthKeyRegistry 892 } 893 postIndex := iNdEx + intStringLen 894 if postIndex > l { 895 return io.ErrUnexpectedEOF 896 } 897 m.ActiveStoreKeyId = string(dAtA[iNdEx:postIndex]) 898 iNdEx = postIndex 899 case 4: 900 if wireType != 2 { 901 return fmt.Errorf("proto: wrong wireType = %d for field ActiveDataKeyId", wireType) 902 } 903 var stringLen uint64 904 for shift := uint(0); ; shift += 7 { 905 if shift >= 64 { 906 return ErrIntOverflowKeyRegistry 907 } 908 if iNdEx >= l { 909 return io.ErrUnexpectedEOF 910 } 911 b := dAtA[iNdEx] 912 iNdEx++ 913 stringLen |= (uint64(b) & 0x7F) << shift 914 if b < 0x80 { 915 break 916 } 917 } 918 intStringLen := int(stringLen) 919 if intStringLen < 0 { 920 return ErrInvalidLengthKeyRegistry 921 } 922 postIndex := iNdEx + intStringLen 923 if postIndex > l { 924 return io.ErrUnexpectedEOF 925 } 926 m.ActiveDataKeyId = string(dAtA[iNdEx:postIndex]) 927 iNdEx = postIndex 928 default: 929 iNdEx = preIndex 930 skippy, err := skipKeyRegistry(dAtA[iNdEx:]) 931 if err != nil { 932 return err 933 } 934 if skippy < 0 { 935 return ErrInvalidLengthKeyRegistry 936 } 937 if (iNdEx + skippy) > l { 938 return io.ErrUnexpectedEOF 939 } 940 iNdEx += skippy 941 } 942 } 943 944 if iNdEx > l { 945 return io.ErrUnexpectedEOF 946 } 947 return nil 948 } 949 func (m *KeyInfo) Unmarshal(dAtA []byte) error { 950 l := len(dAtA) 951 iNdEx := 0 952 for iNdEx < l { 953 preIndex := iNdEx 954 var wire uint64 955 for shift := uint(0); ; shift += 7 { 956 if shift >= 64 { 957 return ErrIntOverflowKeyRegistry 958 } 959 if iNdEx >= l { 960 return io.ErrUnexpectedEOF 961 } 962 b := dAtA[iNdEx] 963 iNdEx++ 964 wire |= (uint64(b) & 0x7F) << shift 965 if b < 0x80 { 966 break 967 } 968 } 969 fieldNum := int32(wire >> 3) 970 wireType := int(wire & 0x7) 971 if wireType == 4 { 972 return fmt.Errorf("proto: KeyInfo: wiretype end group for non-group") 973 } 974 if fieldNum <= 0 { 975 return fmt.Errorf("proto: KeyInfo: illegal tag %d (wire type %d)", fieldNum, wire) 976 } 977 switch fieldNum { 978 case 1: 979 if wireType != 0 { 980 return fmt.Errorf("proto: wrong wireType = %d for field EncryptionType", wireType) 981 } 982 m.EncryptionType = 0 983 for shift := uint(0); ; shift += 7 { 984 if shift >= 64 { 985 return ErrIntOverflowKeyRegistry 986 } 987 if iNdEx >= l { 988 return io.ErrUnexpectedEOF 989 } 990 b := dAtA[iNdEx] 991 iNdEx++ 992 m.EncryptionType |= (EncryptionType(b) & 0x7F) << shift 993 if b < 0x80 { 994 break 995 } 996 } 997 case 2: 998 if wireType != 2 { 999 return fmt.Errorf("proto: wrong wireType = %d for field KeyId", wireType) 1000 } 1001 var stringLen uint64 1002 for shift := uint(0); ; shift += 7 { 1003 if shift >= 64 { 1004 return ErrIntOverflowKeyRegistry 1005 } 1006 if iNdEx >= l { 1007 return io.ErrUnexpectedEOF 1008 } 1009 b := dAtA[iNdEx] 1010 iNdEx++ 1011 stringLen |= (uint64(b) & 0x7F) << shift 1012 if b < 0x80 { 1013 break 1014 } 1015 } 1016 intStringLen := int(stringLen) 1017 if intStringLen < 0 { 1018 return ErrInvalidLengthKeyRegistry 1019 } 1020 postIndex := iNdEx + intStringLen 1021 if postIndex > l { 1022 return io.ErrUnexpectedEOF 1023 } 1024 m.KeyId = string(dAtA[iNdEx:postIndex]) 1025 iNdEx = postIndex 1026 case 3: 1027 if wireType != 0 { 1028 return fmt.Errorf("proto: wrong wireType = %d for field CreationTime", wireType) 1029 } 1030 m.CreationTime = 0 1031 for shift := uint(0); ; shift += 7 { 1032 if shift >= 64 { 1033 return ErrIntOverflowKeyRegistry 1034 } 1035 if iNdEx >= l { 1036 return io.ErrUnexpectedEOF 1037 } 1038 b := dAtA[iNdEx] 1039 iNdEx++ 1040 m.CreationTime |= (int64(b) & 0x7F) << shift 1041 if b < 0x80 { 1042 break 1043 } 1044 } 1045 case 4: 1046 if wireType != 2 { 1047 return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) 1048 } 1049 var stringLen uint64 1050 for shift := uint(0); ; shift += 7 { 1051 if shift >= 64 { 1052 return ErrIntOverflowKeyRegistry 1053 } 1054 if iNdEx >= l { 1055 return io.ErrUnexpectedEOF 1056 } 1057 b := dAtA[iNdEx] 1058 iNdEx++ 1059 stringLen |= (uint64(b) & 0x7F) << shift 1060 if b < 0x80 { 1061 break 1062 } 1063 } 1064 intStringLen := int(stringLen) 1065 if intStringLen < 0 { 1066 return ErrInvalidLengthKeyRegistry 1067 } 1068 postIndex := iNdEx + intStringLen 1069 if postIndex > l { 1070 return io.ErrUnexpectedEOF 1071 } 1072 m.Source = string(dAtA[iNdEx:postIndex]) 1073 iNdEx = postIndex 1074 case 5: 1075 if wireType != 0 { 1076 return fmt.Errorf("proto: wrong wireType = %d for field WasExposed", wireType) 1077 } 1078 var v int 1079 for shift := uint(0); ; shift += 7 { 1080 if shift >= 64 { 1081 return ErrIntOverflowKeyRegistry 1082 } 1083 if iNdEx >= l { 1084 return io.ErrUnexpectedEOF 1085 } 1086 b := dAtA[iNdEx] 1087 iNdEx++ 1088 v |= (int(b) & 0x7F) << shift 1089 if b < 0x80 { 1090 break 1091 } 1092 } 1093 m.WasExposed = bool(v != 0) 1094 case 6: 1095 if wireType != 2 { 1096 return fmt.Errorf("proto: wrong wireType = %d for field ParentKeyId", wireType) 1097 } 1098 var stringLen uint64 1099 for shift := uint(0); ; shift += 7 { 1100 if shift >= 64 { 1101 return ErrIntOverflowKeyRegistry 1102 } 1103 if iNdEx >= l { 1104 return io.ErrUnexpectedEOF 1105 } 1106 b := dAtA[iNdEx] 1107 iNdEx++ 1108 stringLen |= (uint64(b) & 0x7F) << shift 1109 if b < 0x80 { 1110 break 1111 } 1112 } 1113 intStringLen := int(stringLen) 1114 if intStringLen < 0 { 1115 return ErrInvalidLengthKeyRegistry 1116 } 1117 postIndex := iNdEx + intStringLen 1118 if postIndex > l { 1119 return io.ErrUnexpectedEOF 1120 } 1121 m.ParentKeyId = string(dAtA[iNdEx:postIndex]) 1122 iNdEx = postIndex 1123 default: 1124 iNdEx = preIndex 1125 skippy, err := skipKeyRegistry(dAtA[iNdEx:]) 1126 if err != nil { 1127 return err 1128 } 1129 if skippy < 0 { 1130 return ErrInvalidLengthKeyRegistry 1131 } 1132 if (iNdEx + skippy) > l { 1133 return io.ErrUnexpectedEOF 1134 } 1135 iNdEx += skippy 1136 } 1137 } 1138 1139 if iNdEx > l { 1140 return io.ErrUnexpectedEOF 1141 } 1142 return nil 1143 } 1144 func (m *SecretKey) Unmarshal(dAtA []byte) error { 1145 l := len(dAtA) 1146 iNdEx := 0 1147 for iNdEx < l { 1148 preIndex := iNdEx 1149 var wire uint64 1150 for shift := uint(0); ; shift += 7 { 1151 if shift >= 64 { 1152 return ErrIntOverflowKeyRegistry 1153 } 1154 if iNdEx >= l { 1155 return io.ErrUnexpectedEOF 1156 } 1157 b := dAtA[iNdEx] 1158 iNdEx++ 1159 wire |= (uint64(b) & 0x7F) << shift 1160 if b < 0x80 { 1161 break 1162 } 1163 } 1164 fieldNum := int32(wire >> 3) 1165 wireType := int(wire & 0x7) 1166 if wireType == 4 { 1167 return fmt.Errorf("proto: SecretKey: wiretype end group for non-group") 1168 } 1169 if fieldNum <= 0 { 1170 return fmt.Errorf("proto: SecretKey: illegal tag %d (wire type %d)", fieldNum, wire) 1171 } 1172 switch fieldNum { 1173 case 1: 1174 if wireType != 2 { 1175 return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) 1176 } 1177 var msglen int 1178 for shift := uint(0); ; shift += 7 { 1179 if shift >= 64 { 1180 return ErrIntOverflowKeyRegistry 1181 } 1182 if iNdEx >= l { 1183 return io.ErrUnexpectedEOF 1184 } 1185 b := dAtA[iNdEx] 1186 iNdEx++ 1187 msglen |= (int(b) & 0x7F) << shift 1188 if b < 0x80 { 1189 break 1190 } 1191 } 1192 if msglen < 0 { 1193 return ErrInvalidLengthKeyRegistry 1194 } 1195 postIndex := iNdEx + msglen 1196 if postIndex > l { 1197 return io.ErrUnexpectedEOF 1198 } 1199 if m.Info == nil { 1200 m.Info = &KeyInfo{} 1201 } 1202 if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1203 return err 1204 } 1205 iNdEx = postIndex 1206 case 2: 1207 if wireType != 2 { 1208 return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) 1209 } 1210 var byteLen int 1211 for shift := uint(0); ; shift += 7 { 1212 if shift >= 64 { 1213 return ErrIntOverflowKeyRegistry 1214 } 1215 if iNdEx >= l { 1216 return io.ErrUnexpectedEOF 1217 } 1218 b := dAtA[iNdEx] 1219 iNdEx++ 1220 byteLen |= (int(b) & 0x7F) << shift 1221 if b < 0x80 { 1222 break 1223 } 1224 } 1225 if byteLen < 0 { 1226 return ErrInvalidLengthKeyRegistry 1227 } 1228 postIndex := iNdEx + byteLen 1229 if postIndex > l { 1230 return io.ErrUnexpectedEOF 1231 } 1232 m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) 1233 if m.Key == nil { 1234 m.Key = []byte{} 1235 } 1236 iNdEx = postIndex 1237 default: 1238 iNdEx = preIndex 1239 skippy, err := skipKeyRegistry(dAtA[iNdEx:]) 1240 if err != nil { 1241 return err 1242 } 1243 if skippy < 0 { 1244 return ErrInvalidLengthKeyRegistry 1245 } 1246 if (iNdEx + skippy) > l { 1247 return io.ErrUnexpectedEOF 1248 } 1249 iNdEx += skippy 1250 } 1251 } 1252 1253 if iNdEx > l { 1254 return io.ErrUnexpectedEOF 1255 } 1256 return nil 1257 } 1258 func (m *EncryptionSettings) Unmarshal(dAtA []byte) error { 1259 l := len(dAtA) 1260 iNdEx := 0 1261 for iNdEx < l { 1262 preIndex := iNdEx 1263 var wire uint64 1264 for shift := uint(0); ; shift += 7 { 1265 if shift >= 64 { 1266 return ErrIntOverflowKeyRegistry 1267 } 1268 if iNdEx >= l { 1269 return io.ErrUnexpectedEOF 1270 } 1271 b := dAtA[iNdEx] 1272 iNdEx++ 1273 wire |= (uint64(b) & 0x7F) << shift 1274 if b < 0x80 { 1275 break 1276 } 1277 } 1278 fieldNum := int32(wire >> 3) 1279 wireType := int(wire & 0x7) 1280 if wireType == 4 { 1281 return fmt.Errorf("proto: EncryptionSettings: wiretype end group for non-group") 1282 } 1283 if fieldNum <= 0 { 1284 return fmt.Errorf("proto: EncryptionSettings: illegal tag %d (wire type %d)", fieldNum, wire) 1285 } 1286 switch fieldNum { 1287 case 1: 1288 if wireType != 0 { 1289 return fmt.Errorf("proto: wrong wireType = %d for field EncryptionType", wireType) 1290 } 1291 m.EncryptionType = 0 1292 for shift := uint(0); ; shift += 7 { 1293 if shift >= 64 { 1294 return ErrIntOverflowKeyRegistry 1295 } 1296 if iNdEx >= l { 1297 return io.ErrUnexpectedEOF 1298 } 1299 b := dAtA[iNdEx] 1300 iNdEx++ 1301 m.EncryptionType |= (EncryptionType(b) & 0x7F) << shift 1302 if b < 0x80 { 1303 break 1304 } 1305 } 1306 case 2: 1307 if wireType != 2 { 1308 return fmt.Errorf("proto: wrong wireType = %d for field KeyId", wireType) 1309 } 1310 var stringLen uint64 1311 for shift := uint(0); ; shift += 7 { 1312 if shift >= 64 { 1313 return ErrIntOverflowKeyRegistry 1314 } 1315 if iNdEx >= l { 1316 return io.ErrUnexpectedEOF 1317 } 1318 b := dAtA[iNdEx] 1319 iNdEx++ 1320 stringLen |= (uint64(b) & 0x7F) << shift 1321 if b < 0x80 { 1322 break 1323 } 1324 } 1325 intStringLen := int(stringLen) 1326 if intStringLen < 0 { 1327 return ErrInvalidLengthKeyRegistry 1328 } 1329 postIndex := iNdEx + intStringLen 1330 if postIndex > l { 1331 return io.ErrUnexpectedEOF 1332 } 1333 m.KeyId = string(dAtA[iNdEx:postIndex]) 1334 iNdEx = postIndex 1335 case 3: 1336 if wireType != 2 { 1337 return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) 1338 } 1339 var byteLen int 1340 for shift := uint(0); ; shift += 7 { 1341 if shift >= 64 { 1342 return ErrIntOverflowKeyRegistry 1343 } 1344 if iNdEx >= l { 1345 return io.ErrUnexpectedEOF 1346 } 1347 b := dAtA[iNdEx] 1348 iNdEx++ 1349 byteLen |= (int(b) & 0x7F) << shift 1350 if b < 0x80 { 1351 break 1352 } 1353 } 1354 if byteLen < 0 { 1355 return ErrInvalidLengthKeyRegistry 1356 } 1357 postIndex := iNdEx + byteLen 1358 if postIndex > l { 1359 return io.ErrUnexpectedEOF 1360 } 1361 m.Nonce = append(m.Nonce[:0], dAtA[iNdEx:postIndex]...) 1362 if m.Nonce == nil { 1363 m.Nonce = []byte{} 1364 } 1365 iNdEx = postIndex 1366 case 4: 1367 if wireType != 0 { 1368 return fmt.Errorf("proto: wrong wireType = %d for field Counter", wireType) 1369 } 1370 m.Counter = 0 1371 for shift := uint(0); ; shift += 7 { 1372 if shift >= 64 { 1373 return ErrIntOverflowKeyRegistry 1374 } 1375 if iNdEx >= l { 1376 return io.ErrUnexpectedEOF 1377 } 1378 b := dAtA[iNdEx] 1379 iNdEx++ 1380 m.Counter |= (uint32(b) & 0x7F) << shift 1381 if b < 0x80 { 1382 break 1383 } 1384 } 1385 default: 1386 iNdEx = preIndex 1387 skippy, err := skipKeyRegistry(dAtA[iNdEx:]) 1388 if err != nil { 1389 return err 1390 } 1391 if skippy < 0 { 1392 return ErrInvalidLengthKeyRegistry 1393 } 1394 if (iNdEx + skippy) > l { 1395 return io.ErrUnexpectedEOF 1396 } 1397 iNdEx += skippy 1398 } 1399 } 1400 1401 if iNdEx > l { 1402 return io.ErrUnexpectedEOF 1403 } 1404 return nil 1405 } 1406 func skipKeyRegistry(dAtA []byte) (n int, err error) { 1407 l := len(dAtA) 1408 iNdEx := 0 1409 for iNdEx < l { 1410 var wire uint64 1411 for shift := uint(0); ; shift += 7 { 1412 if shift >= 64 { 1413 return 0, ErrIntOverflowKeyRegistry 1414 } 1415 if iNdEx >= l { 1416 return 0, io.ErrUnexpectedEOF 1417 } 1418 b := dAtA[iNdEx] 1419 iNdEx++ 1420 wire |= (uint64(b) & 0x7F) << shift 1421 if b < 0x80 { 1422 break 1423 } 1424 } 1425 wireType := int(wire & 0x7) 1426 switch wireType { 1427 case 0: 1428 for shift := uint(0); ; shift += 7 { 1429 if shift >= 64 { 1430 return 0, ErrIntOverflowKeyRegistry 1431 } 1432 if iNdEx >= l { 1433 return 0, io.ErrUnexpectedEOF 1434 } 1435 iNdEx++ 1436 if dAtA[iNdEx-1] < 0x80 { 1437 break 1438 } 1439 } 1440 return iNdEx, nil 1441 case 1: 1442 iNdEx += 8 1443 return iNdEx, nil 1444 case 2: 1445 var length int 1446 for shift := uint(0); ; shift += 7 { 1447 if shift >= 64 { 1448 return 0, ErrIntOverflowKeyRegistry 1449 } 1450 if iNdEx >= l { 1451 return 0, io.ErrUnexpectedEOF 1452 } 1453 b := dAtA[iNdEx] 1454 iNdEx++ 1455 length |= (int(b) & 0x7F) << shift 1456 if b < 0x80 { 1457 break 1458 } 1459 } 1460 iNdEx += length 1461 if length < 0 { 1462 return 0, ErrInvalidLengthKeyRegistry 1463 } 1464 return iNdEx, nil 1465 case 3: 1466 for { 1467 var innerWire uint64 1468 var start int = iNdEx 1469 for shift := uint(0); ; shift += 7 { 1470 if shift >= 64 { 1471 return 0, ErrIntOverflowKeyRegistry 1472 } 1473 if iNdEx >= l { 1474 return 0, io.ErrUnexpectedEOF 1475 } 1476 b := dAtA[iNdEx] 1477 iNdEx++ 1478 innerWire |= (uint64(b) & 0x7F) << shift 1479 if b < 0x80 { 1480 break 1481 } 1482 } 1483 innerWireType := int(innerWire & 0x7) 1484 if innerWireType == 4 { 1485 break 1486 } 1487 next, err := skipKeyRegistry(dAtA[start:]) 1488 if err != nil { 1489 return 0, err 1490 } 1491 iNdEx = start + next 1492 } 1493 return iNdEx, nil 1494 case 4: 1495 return iNdEx, nil 1496 case 5: 1497 iNdEx += 4 1498 return iNdEx, nil 1499 default: 1500 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1501 } 1502 } 1503 panic("unreachable") 1504 } 1505 1506 var ( 1507 ErrInvalidLengthKeyRegistry = fmt.Errorf("proto: negative length found during unmarshaling") 1508 ErrIntOverflowKeyRegistry = fmt.Errorf("proto: integer overflow") 1509 ) 1510 1511 func init() { 1512 proto.RegisterFile("ccl/storageccl/engineccl/enginepbccl/key_registry.proto", fileDescriptor_key_registry_cc37749f10f852e8) 1513 } 1514 1515 var fileDescriptor_key_registry_cc37749f10f852e8 = []byte{ 1516 // 594 bytes of a gzipped FileDescriptorProto 1517 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x94, 0x4f, 0x6f, 0xd3, 0x4c, 1518 0x10, 0xc6, 0xb3, 0x49, 0x93, 0x36, 0x93, 0x26, 0x8d, 0xf6, 0xed, 0x8b, 0xa2, 0x1e, 0x4c, 0x14, 1519 0x2e, 0x11, 0xa8, 0xae, 0x08, 0x82, 0xb6, 0x1c, 0x90, 0xf8, 0x93, 0x43, 0x55, 0x41, 0x91, 0xd3, 1520 0x13, 0x17, 0x6b, 0xbb, 0x9e, 0x1a, 0xe3, 0x74, 0xd7, 0x5a, 0x6f, 0xda, 0xfa, 0x33, 0x70, 0xe1, 1521 0xf3, 0x70, 0xe6, 0xd0, 0x63, 0x8f, 0x3d, 0x42, 0xfa, 0x45, 0x90, 0xd7, 0x76, 0x9a, 0x20, 0x2e, 1522 0x51, 0x0f, 0xdc, 0xe6, 0x19, 0xef, 0x3e, 0xbf, 0x9d, 0x79, 0xa2, 0xc0, 0x2e, 0xe7, 0xe3, 0x9d, 1523 0x58, 0x4b, 0xc5, 0x7c, 0x4c, 0x4b, 0x14, 0x7e, 0x20, 0xe6, 0xaa, 0xe8, 0x24, 0xad, 0x43, 0x4c, 1524 0x5c, 0x85, 0x7e, 0x10, 0x6b, 0x95, 0xd8, 0x91, 0x92, 0x5a, 0x52, 0x9b, 0x4b, 0x1e, 0x2a, 0xc9, 1525 0xf8, 0x67, 0x9b, 0xf3, 0xb1, 0x7d, 0x67, 0x61, 0xcf, 0x2c, 0xec, 0x39, 0x8b, 0xad, 0x4d, 0x5f, 1526 0xfa, 0xd2, 0x5c, 0xdd, 0x49, 0xab, 0xcc, 0xa5, 0xf7, 0x7d, 0x05, 0xda, 0xef, 0x98, 0x66, 0x87, 1527 0x98, 0xc4, 0x4e, 0x0e, 0xa0, 0x02, 0x20, 0xb5, 0x43, 0x37, 0xc4, 0x24, 0xee, 0x90, 0x6e, 0xa5, 1528 0xdf, 0x18, 0x1c, 0x2d, 0xc9, 0xb3, 0xff, 0x74, 0xb5, 0x47, 0xa9, 0x65, 0xda, 0x19, 0x0a, 0xad, 1529 0x12, 0xa7, 0x1e, 0x17, 0x9a, 0x86, 0x50, 0xf7, 0x98, 0x66, 0x19, 0xae, 0x6c, 0x70, 0x1f, 0xee, 1530 0x8d, 0x2b, 0x1a, 0x19, 0x6d, 0xcd, 0xcb, 0x25, 0xdd, 0x86, 0xff, 0x18, 0xd7, 0xc1, 0x39, 0xba, 1531 0xb3, 0x19, 0xdd, 0xc0, 0xeb, 0x54, 0xba, 0xa4, 0x5f, 0x77, 0xda, 0xd9, 0xa7, 0xe2, 0xa9, 0x07, 1532 0x1e, 0x7d, 0x02, 0x34, 0x3f, 0x5e, 0x3c, 0x31, 0x3d, 0xbd, 0x62, 0x4e, 0x6f, 0x64, 0x5f, 0x72, 1533 0xd2, 0x81, 0xb7, 0x35, 0x81, 0xd6, 0xe2, 0x94, 0xb4, 0x0d, 0x95, 0x10, 0x93, 0x0e, 0x31, 0xe7, 1534 0xd3, 0x92, 0xbe, 0x87, 0xea, 0x39, 0x1b, 0x4f, 0xb0, 0x53, 0xee, 0x92, 0x7e, 0x63, 0xb0, 0xbb, 1535 0xec, 0xa0, 0x29, 0x49, 0x9c, 0x4a, 0x27, 0x73, 0x79, 0x59, 0xde, 0x23, 0x5b, 0xe7, 0xd0, 0x5c, 1536 0x98, 0xf6, 0x2f, 0xd4, 0xa3, 0x45, 0xea, 0xfe, 0xb2, 0xd4, 0x11, 0x72, 0x85, 0xfa, 0x10, 0x93, 1537 0x39, 0x6e, 0xef, 0x6b, 0x19, 0x56, 0xf3, 0xe7, 0x50, 0x1f, 0x36, 0x50, 0x70, 0x95, 0x44, 0x3a, 1538 0x90, 0xc2, 0xd5, 0x49, 0x84, 0x06, 0xdf, 0x1a, 0xbc, 0x5a, 0x16, 0x35, 0x9c, 0xd9, 0x1c, 0x27, 1539 0x11, 0x3a, 0x2d, 0x5c, 0xd0, 0xf4, 0x7f, 0xa8, 0xe5, 0x21, 0x94, 0xcd, 0x78, 0xd5, 0xd0, 0xe4, 1540 0xf4, 0x08, 0x9a, 0x5c, 0x21, 0xcb, 0xe8, 0xc1, 0x19, 0x9a, 0x40, 0x2b, 0xce, 0x7a, 0xd1, 0x3c, 1541 0x0e, 0xce, 0x90, 0x3e, 0x80, 0x5a, 0x2c, 0x27, 0x8a, 0x63, 0x1e, 0x60, 0xae, 0xe8, 0x43, 0x68, 1542 0x5c, 0xb0, 0xd8, 0xc5, 0xcb, 0x48, 0xc6, 0xe8, 0x75, 0xaa, 0x5d, 0xd2, 0x5f, 0x73, 0xe0, 0x82, 1543 0xc5, 0xc3, 0xac, 0x43, 0x7b, 0xd0, 0x8c, 0x98, 0x42, 0xa1, 0x8b, 0x1f, 0x40, 0xcd, 0xdc, 0x6f, 1544 0x64, 0x4d, 0x13, 0x7e, 0xef, 0x0b, 0xd4, 0x67, 0x5b, 0xa2, 0x87, 0xb0, 0x12, 0x88, 0x53, 0x69, 1545 0x76, 0x70, 0x8f, 0x90, 0x8d, 0x49, 0x11, 0x67, 0x3a, 0xef, 0xba, 0x89, 0xb3, 0xf7, 0x83, 0x00, 1546 0xbd, 0xdb, 0xd3, 0x08, 0xb5, 0x0e, 0x84, 0x1f, 0xff, 0xf3, 0x10, 0x36, 0xa1, 0x2a, 0xa4, 0xe0, 1547 0xd9, 0xf2, 0xd7, 0x9d, 0x4c, 0xd0, 0x0e, 0xac, 0x72, 0x39, 0x11, 0x1a, 0x95, 0x59, 0x7b, 0xd3, 1548 0x29, 0xe4, 0xe3, 0x23, 0x68, 0x2d, 0x82, 0x68, 0x13, 0xea, 0x1f, 0xc7, 0x2c, 0x10, 0x1a, 0x2f, 1549 0x75, 0xbb, 0x44, 0x5b, 0x00, 0xaf, 0x87, 0xa3, 0xa7, 0x83, 0x3d, 0xf7, 0xed, 0xb1, 0xd3, 0x26, 1550 0x85, 0xde, 0x1f, 0x18, 0x5d, 0xce, 0xf5, 0xe0, 0xf9, 0x0b, 0xa3, 0x2b, 0x6f, 0xb6, 0xaf, 0x7e, 1551 0x59, 0xa5, 0xab, 0xa9, 0x45, 0xae, 0xa7, 0x16, 0xb9, 0x99, 0x5a, 0xe4, 0xe7, 0xd4, 0x22, 0xdf, 1552 0x6e, 0xad, 0xd2, 0xf5, 0xad, 0x55, 0xba, 0xb9, 0xb5, 0x4a, 0x9f, 0x1a, 0x73, 0x53, 0x9e, 0xd4, 1553 0xcc, 0x9f, 0xe0, 0xb3, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xb6, 0x4a, 0xe4, 0x4b, 0x85, 0x05, 1554 0x00, 0x00, 1555 }