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 package ed25519_test 6 7 import ( 8 ed25519std "crypto/ed25519" 9 "testing" 10 11 "golang.org/x/crypto/ed25519" 12 ) 13 14 func TestTypeAlias(t *testing.T) { 15 public, private, _ := ed25519std.GenerateKey(nil) 16 17 message := []byte("test message") 18 sig := ed25519.Sign(private, message) 19 if !ed25519.Verify(public, message, sig) { 20 t.Errorf("valid signature rejected") 21 } 22 } 23