libgocryptfs/internal/prefer_openssl/prefer_go1.5.go

19 lines
389 B
Go
Raw Normal View History

// +build !go1.6 !amd64
// not go1.6+ OR not amd64
package prefer_openssl
import (
"github.com/rfjakob/gocryptfs/internal/stupidgcm"
)
2016-10-02 06:14:18 +02:00
// PreferOpenSSL returns true if OpenSSL should be used.
func PreferOpenSSL() bool {
if stupidgcm.BuiltWithoutOpenssl {
return false
}
// OpenSSL is always faster than Go GCM on old Go versions or on anything
// other than amd64
return true
}