Initial commit: AetherForge Linux (forge-mesh) v0.1.0-dev
Some checks failed
Test / test (push) Has been cancelled

This commit is contained in:
drjones
2026-07-04 09:31:23 +00:00
commit 3678b199d0
154 changed files with 21714 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
package forge
import (
"testing"
)
func TestSignVerify(t *testing.T) {
path := t.TempDir() + "/signing.key"
kp, err := LoadOrCreateKey(path)
if err != nil {
t.Fatal(err)
}
data := []byte("forge-mesh artifact")
sig := kp.Sign(data)
if !Verify(kp.Public, data, sig) {
t.Fatal("signature verification failed")
}
if Verify(kp.Public, []byte("tampered"), sig) {
t.Fatal("tampered data should not verify")
}
}