summaryrefslogtreecommitdiff
path: root/internal/cryptocore/cryptocore_go1.4_test.go
blob: 14e1e03f59271cda44d33f1534a528c5d74ae3fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// +build !go1.5
// = go 1.4 or lower

package cryptocore

import (
	"testing"
)

// Native Go crypto with 128-bit IVs is only supported on Go 1.5 and up,
// this should panic.
func TestCryptoCoreNewGo14(t *testing.T) {
	defer func() {
		if r := recover(); r == nil {
			t.Errorf("The code did not panic")
		}
	}()
	key := make([]byte, 32)
	New(key, BackendGoGCM, 128)
}