1
0
Fork 0
go packages which are fine
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
mediocre-go-lib/mcrypto/pair_test.go

17 lines
319 B

package mcrypto
import (
. "testing"
"github.com/mediocregopher/mediocre-go-lib/mrand"
"github.com/stretchr/testify/assert"
)
func TestKeyPair(t *T) {
pub, priv := NewWeakKeyPair()
// test signing/verifying
str := mrand.Hex(512)
sig := SignString(priv, str)
assert.NoError(t, VerifyString(pub, sig, str))
}