File: fips.go

package info (click to toggle)
notary 0.6.1~ds1-3
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 4,692 kB
  • sloc: python: 1,112; sh: 481; makefile: 181; sql: 155
file content (14 lines) | stat: -rw-r--r-- 355 bytes parent folder | download
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()
}