Source file src/crypto/internal/fips140/fips140.go

     1  // Copyright 2024 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  package fips140
     6  
     7  import "crypto/internal/fips140deps/godebug"
     8  
     9  var Enabled bool
    10  
    11  var debug bool
    12  
    13  func init() {
    14  	switch godebug.Value("#fips140") {
    15  	case "on", "only":
    16  		Enabled = true
    17  	case "debug":
    18  		Enabled = true
    19  		debug = true
    20  	}
    21  }
    22  
    23  func Name() string {
    24  	return "Go Cryptographic Module"
    25  }
    26  
    27  func Version() string {
    28  	return "v1.0"
    29  }
    30  

View as plain text