summaryrefslogtreecommitdiff
path: root/internal/speed/speed.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2021-09-08 20:46:52 +0200
committerJakob Unterwurzacher2021-09-08 20:46:52 +0200
commitad21647f250697d88eade461c08073732d2cf7e0 (patch)
treeeea50b8c92ac540a2baa0cbb14f04e049ec9c861 /internal/speed/speed.go
parent2620cad0dc003c4d06b3c1c082a3337b64bc9410 (diff)
-speed: show which xchacha implementation is preferred
Diffstat (limited to 'internal/speed/speed.go')
-rw-r--r--internal/speed/speed.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/internal/speed/speed.go b/internal/speed/speed.go
index d5aa696..f7cb5d3 100644
--- a/internal/speed/speed.go
+++ b/internal/speed/speed.go
@@ -35,8 +35,8 @@ func Run() {
{name: cryptocore.BackendOpenSSL.Name, f: bStupidGCM, preferred: stupidgcm.PreferOpenSSLAES256GCM()},
{name: cryptocore.BackendGoGCM.Name, f: bGoGCM, preferred: !stupidgcm.PreferOpenSSLAES256GCM()},
{name: cryptocore.BackendAESSIV.Name, f: bAESSIV, preferred: false},
- {name: cryptocore.BackendXChaCha20Poly1305.Name, f: bXchacha20poly1305, preferred: false},
- {name: cryptocore.BackendXChaCha20Poly1305OpenSSL.Name, f: bStupidXchacha, preferred: false},
+ {name: cryptocore.BackendXChaCha20Poly1305OpenSSL.Name, f: bStupidXchacha, preferred: stupidgcm.PreferOpenSSLXchacha20poly1305()},
+ {name: cryptocore.BackendXChaCha20Poly1305.Name, f: bXchacha20poly1305, preferred: !stupidgcm.PreferOpenSSLXchacha20poly1305()},
}
for _, b := range bTable {
fmt.Printf("%-26s\t", b.name)
@@ -48,8 +48,6 @@ func Run() {
}
if b.preferred {
fmt.Printf("\t(selected in auto mode)\n")
- } else if b.name == cryptocore.BackendXChaCha20Poly1305.Name {
- fmt.Printf("\t(use via -xchacha flag)\n")
} else {
fmt.Printf("\t\n")
}