meowlib/keys_test.go

26 lines
433 B
Go
Raw Normal View History

2021-10-18 21:05:44 +02:00
package meow
import (
"fmt"
"log"
"testing"
)
func TestNewKeyPair(t *testing.T) {
kp := NewKeyPair()
fmt.Println(kp.Public)
fmt.Println(kp.Private)
}
func TestGetKey(t *testing.T) {
kp := NewKeyPair()
// fmt.Println(kp.Public)
// fmt.Println(kp.Private)
key := kp.GetCryptoKeyObject()
// fmt.Println(key.Armor())
pubkey, _ := key.GetArmoredPublicKey()
if kp.Public != pubkey {
log.Fatal("error in public key")
}
}