- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for newBuiltin (0.19 sec)
-
internal/kms/secret-key.go
} keyID, b64Key := v[0], v[1] key, err := base64.StdEncoding.DecodeString(b64Key) if err != nil { return nil, err } return NewBuiltin(keyID, key) } // NewBuiltin returns a single-key KMS that derives new DEKs from the // given key. func NewBuiltin(keyID string, key []byte) (*KMS, error) { if len(key) != 32 { return nil, errors.New("kms: invalid key length " + strconv.Itoa(len(key))) } return &KMS{
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Tue May 07 23:55:37 UTC 2024 - 8.2K bytes - Viewed (0) -
internal/config/crypto_test.go
func TestEncryptDecrypt(t *testing.T) { key, err := hex.DecodeString("ddedadb867afa3f73bd33c25499a723ed7f9f51172ee7b1b679e08dc795debcc") if err != nil { t.Fatalf("Failed to decode master key: %v", err) } KMS, err := kms.NewBuiltin("my-key", key) if err != nil { t.Fatalf("Failed to create KMS: %v", err) } for i, test := range encryptDecryptTests { ciphertext, err := Encrypt(KMS, bytes.NewReader(test.Data), test.Context)
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Tue May 07 23:55:37 UTC 2024 - 3.2K bytes - Viewed (0) -
src/cmd/compile/internal/types2/universe.go
} def(newBuiltin(id)) } } // DefPredeclaredTestFuncs defines the assert and trace built-ins. // These built-ins are intended for debugging and testing of this // package only. func DefPredeclaredTestFuncs() { if Universe.Lookup("assert") != nil { return // already defined } def(newBuiltin(_Assert)) def(newBuiltin(_Trace)) } func init() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 20:08:23 UTC 2024 - 9.1K bytes - Viewed (0) -
src/go/types/universe.go
} def(newBuiltin(id)) } } // DefPredeclaredTestFuncs defines the assert and trace built-ins. // These built-ins are intended for debugging and testing of this // package only. func DefPredeclaredTestFuncs() { if Universe.Lookup("assert") != nil { return // already defined } def(newBuiltin(_Assert)) def(newBuiltin(_Trace)) } func init() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 20:08:23 UTC 2024 - 9.3K bytes - Viewed (0) -
src/cmd/compile/internal/types2/object.go
} // A Builtin represents a built-in function. // Builtins don't have a valid type. type Builtin struct { object id builtinId } func newBuiltin(id builtinId) *Builtin { return &Builtin{object{name: predeclaredFuncs[id].name, typ: Typ[Invalid], color_: black}, id} } // Nil represents the predeclared value nil. type Nil struct { object }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 20:08:23 UTC 2024 - 20.1K bytes - Viewed (0) -
src/go/types/object.go
} // A Builtin represents a built-in function. // Builtins don't have a valid type. type Builtin struct { object id builtinId } func newBuiltin(id builtinId) *Builtin { return &Builtin{object{name: predeclaredFuncs[id].name, typ: Typ[Invalid], color_: black}, id} } // Nil represents the predeclared value nil. type Nil struct { object }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 20:08:23 UTC 2024 - 20.1K bytes - Viewed (0)