Skip to content

Instantly share code, notes, and snippets.

func Fuzz(data []byte) int {
kp := key.NewKeyPair("127.0.0.1")
h := sha256.New
cipher, err := Encrypt(key.KeyGroup, h, kp.Public.Key, data)
if err != nil {
return 0
}
plain, err := Decrypt(key.KeyGroup, h, kp.Key, cipher)
res := bytes.Compare(data, plain)
if err != nil {