Debian Codegraph @

internal/config/streamingaeadconfig/v0.go

raw symbols SCIP
1 // Copyright 2025 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 // Package streamingaeadconfig provides StreamingAEAD configurations for Tink.
16 package streamingaeadconfigscip-go gomod github.com/tink-crypto/tink-go/v2 . `github.com/tink-crypto/tink-go/v2/internal/config/streamingaeadconfig`/
17
18 import (
19 "fmtscip-go gomod github.com/golang/go/src go1.24.0 fmt/"
20
21 "github.com/tink-crypto/tink-go/v2/internal/configscip-go gomod github.com/tink-crypto/tink-go/v2 . `github.com/tink-crypto/tink-go/v2/internal/config`/"
22 "github.com/tink-crypto/tink-go/v2/internal/internalapiscip-go gomod github.com/tink-crypto/tink-go/v2 . `github.com/tink-crypto/tink-go/v2/internal/internalapi`/"
23 "github.com/tink-crypto/tink-go/v2/streamingaead/aesctrhmacscip-go gomod github.com/tink-crypto/tink-go/v2 . `github.com/tink-crypto/tink-go/v2/streamingaead/aesctrhmac`/"
24 "github.com/tink-crypto/tink-go/v2/streamingaead/aesgcmhkdfscip-go gomod github.com/tink-crypto/tink-go/v2 . `github.com/tink-crypto/tink-go/v2/streamingaead/aesgcmhkdf`/"
25 )
26
27 var configV0scip-go gomod github.com/tink-crypto/tink-go/v2 . `github.com/tink-crypto/tink-go/v2/internal/config/streamingaeadconfig`/configV0. = mustCreateConfigV0scip-go gomod github.com/tink-crypto/tink-go/v2 . `github.com/tink-crypto/tink-go/v2/internal/config/streamingaeadconfig`/mustCreateConfigV0().()
28
29 func mustCreateConfigV0scip-go gomod github.com/tink-crypto/tink-go/v2 . `github.com/tink-crypto/tink-go/v2/internal/config/streamingaeadconfig`/mustCreateConfigV0().() configscip-go gomod github.com/tink-crypto/tink-go/v2 . `github.com/tink-crypto/tink-go/v2/internal/config`/.Configscip-go gomod github.com/tink-crypto/tink-go/v2 . `github.com/tink-crypto/tink-go/v2/internal/config`/Config# {
30 builder := configscip-go gomod github.com/tink-crypto/tink-go/v2 . `github.com/tink-crypto/tink-go/v2/internal/config`/.NewBuilderscip-go gomod github.com/tink-crypto/tink-go/v2 . `github.com/tink-crypto/tink-go/v2/internal/config`/NewBuilder().()
31
32 if err := aesgcmhkdfscip-go gomod github.com/tink-crypto/tink-go/v2 . `github.com/tink-crypto/tink-go/v2/streamingaead/aesgcmhkdf`/.RegisterPrimitiveConstructorscip-go gomod github.com/tink-crypto/tink-go/v2 . `github.com/tink-crypto/tink-go/v2/streamingaead/aesgcmhkdf`/RegisterPrimitiveConstructor().(builder, internalapiscip-go gomod github.com/tink-crypto/tink-go/v2 . `github.com/tink-crypto/tink-go/v2/internal/internalapi`/.Tokenscip-go gomod github.com/tink-crypto/tink-go/v2 . `github.com/tink-crypto/tink-go/v2/internal/internalapi`/Token#{}); err != nil {
33 panic(fmtscip-go gomod github.com/golang/go/src go1.24.0 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.24.0 fmt/Sprintf().("mustCreateConfigV0() failed to register AES-GCM-HKDF: %v", err))
34 }
35 if err := aesctrhmacscip-go gomod github.com/tink-crypto/tink-go/v2 . `github.com/tink-crypto/tink-go/v2/streamingaead/aesctrhmac`/.RegisterPrimitiveConstructorscip-go gomod github.com/tink-crypto/tink-go/v2 . `github.com/tink-crypto/tink-go/v2/streamingaead/aesctrhmac`/RegisterPrimitiveConstructor().(builder, internalapiscip-go gomod github.com/tink-crypto/tink-go/v2 . `github.com/tink-crypto/tink-go/v2/internal/internalapi`/.Tokenscip-go gomod github.com/tink-crypto/tink-go/v2 . `github.com/tink-crypto/tink-go/v2/internal/internalapi`/Token#{}); err != nil {
36 panic(fmtscip-go gomod github.com/golang/go/src go1.24.0 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.24.0 fmt/Sprintf().("mustCreateConfigV0() failed to register AES-CTR-HMAC: %v", err))
37 }
38
39 return builder.Buildscip-go gomod github.com/tink-crypto/tink-go/v2 . `github.com/tink-crypto/tink-go/v2/internal/config`/Builder#Build().()
40 }
41
42 // V0 returns an instance of the ConfigV0.
43 func V0scip-go gomod github.com/tink-crypto/tink-go/v2 . `github.com/tink-crypto/tink-go/v2/internal/config/streamingaeadconfig`/V0().() configscip-go gomod github.com/tink-crypto/tink-go/v2 . `github.com/tink-crypto/tink-go/v2/internal/config`/.Configscip-go gomod github.com/tink-crypto/tink-go/v2 . `github.com/tink-crypto/tink-go/v2/internal/config`/Config# { return configV0scip-go gomod github.com/tink-crypto/tink-go/v2 . `github.com/tink-crypto/tink-go/v2/internal/config/streamingaeadconfig`/configV0. }