Files
nebula/noiseutil/notboring.go
T
2026-06-09 13:24:59 -04:00

26 lines
419 B
Go

//go:build !boringcrypto
package noiseutil
import (
"crypto/fips140"
"github.com/flynn/noise"
)
// EncryptLockNeeded indicates if calls to Encrypt need a lock
var EncryptLockNeeded = fips140.Enabled()
var CipherAESGCM noise.CipherFunc = initAESGCM()
func initAESGCM() noise.CipherFunc {
if fips140.Enabled() {
return CipherAESGCMFIPS140
} else {
return noise.CipherAESGCM
}
}
var boringEnabled = false