any-sync/util/keys/asymmetric/signingkey/signingkey_test.go
2023-03-24 11:45:39 +01:00

17 lines
384 B
Go

package signingkey
import (
"crypto/ed25519"
"crypto/rand"
"fmt"
"testing"
)
func Test(t *testing.T) {
pubKey, privKey, _ := ed25519.GenerateKey(rand.Reader)
msg := []byte("some stuffsafeesafujeaiofjoeai joaij fioaj iofaj oifaj foiajio fjao jo")
enc := EncryptWithEd25519(pubKey, msg)
dec := DecryptWithEd25519(pubKey, privKey, enc)
fmt.Println(string(enc), string(dec))
}