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