speed: fix build for Go 1.4 and lower

Old Go versions miss cipher.NewGCMWithNonceSize, which causes:

  internal/speed/speed.go:95: undefined: cipher.NewGCMWithNonceSize
This commit is contained in:
Jakob Unterwurzacher 2017-02-23 00:04:51 +01:00
parent 1e03e059fa
commit 477071d673
3 changed files with 15 additions and 0 deletions

View File

@ -1,3 +1,5 @@
// +build go1.5
// Package speed implements the "-speed" command-line option, // Package speed implements the "-speed" command-line option,
// similar to "openssl speed". // similar to "openssl speed".
// It benchmarks the crypto algorithms and libraries used by // It benchmarks the crypto algorithms and libraries used by

View File

@ -0,0 +1,11 @@
// +build !go1.5
package speed
import (
"fmt"
)
func Run() {
fmt.Printf("Compile with Go 1.5 or higher to run the benchmarks\n")
}

View File

@ -1,3 +1,5 @@
// +build go1.5
package speed package speed
/* /*