File: fips.go

package info (click to toggle)
notary 0.6.1~ds2-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 5,072 kB
  • sloc: python: 1,112; sh: 481; makefile: 183; sql: 155
file content (14 lines) | stat: -rw-r--r-- 355 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package notary

import (
	"crypto"
	// Need to import md5 so can test availability.
	_ "crypto/md5"
)

// FIPSEnabled returns true if running in FIPS mode.
// If compiled in FIPS mode the md5 hash function is never available
// even when imported. This seems to be the best test we have for it.
func FIPSEnabled() bool {
	return !crypto.MD5.Available()
}