1// Copyright 2019 The Go Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style 3// license that can be found in the LICENSE file. 4 5// +build go1.13 6 7package ed25519_test 8 9import ( 10 ed25519std "crypto/ed25519" 11 "golang.org/x/crypto/ed25519" 12 "testing" 13) 14 15func TestTypeAlias(t *testing.T) { 16 var zero zeroReader 17 public, private, _ := ed25519std.GenerateKey(zero) 18 19 message := []byte("test message") 20 sig := ed25519.Sign(private, message) 21 if !ed25519.Verify(public, message, sig) { 22 t.Errorf("valid signature rejected") 23 } 24} 25