summaryrefslogtreecommitdiff
path: root/internal/stupidgcm/chacha_test.go
blob: 5f803aa3acead59bf855e9dfde68ce745a4a2bdd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// +build !without_openssl

package stupidgcm

import (
	"testing"

	"golang.org/x/crypto/chacha20poly1305"
)

func TestStupidChacha20poly1305(t *testing.T) {
	key := randBytes(32)
	c := NewChacha20poly1305(key)
	ref, err := chacha20poly1305.New(key)
	if err != nil {
		t.Fatal(err)
	}

	testCiphers(t, c, ref)
}