Source file src/crypto/hpke/aead_fipsv2.0.go

     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/cipher"
    11  	"crypto/internal/fips140/aes"
    12  	"crypto/internal/fips140/aes/gcm"
    13  )
    14  
    15  func newAESGCM(key []byte) (cipher.AEAD, error) {
    16  	b, err := aes.New(key)
    17  	if err != nil {
    18  		return nil, err
    19  	}
    20  	return gcm.NewGCMForHPKE(b)
    21  }
    22  

View as plain text