src/crypto/hpke/aead_fips140v1.0.go
raw| 1 | // Copyright 2025 The Go Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
| 5 | //go:build fips140v1.0 |
| 6 | |
| 7 | package hpke |
| 8 | |
| 9 | import ( |
| 10 | "crypto/aes" |
| 11 | "crypto/cipher" |
| 12 | ) |
| 13 | |
| 14 | func newAESGCM(key []byte) (cipher.AEAD, error) { |
| 15 | b, err := aes.NewCipher(key) |
| 16 | if err != nil { |
| 17 | return nil, err |
| 18 | } |
| 19 | return cipher.NewGCM(b) |
| 20 | } |