Error when verify signature [SOLVED]

Hi,
when I try to verify a signed message I get the error

“Public key size must be 32
Parameter name: publicKey.Length”

I used the generate key function in c# wrapper

private: 3e68f36c978e24fbb212316d92070e4d88ea383f23387c5c44592df809d10802
public: 5d64e0d34334d64c17e9e3d35f0270508038bb833029994b732b42ac02934faa

then tried

var keyInBytes = (new ASCIIEncoding()).GetBytes(key);
var dataInBytes = (new ASCIIEncoding()).GetBytes(message);
return Ed25519.Verify(signature, dataInBytes, keyInBytes);

signature was obtained earlier using
var sg = new Signature(dataInBytes, new PrivateKey(key));
var signature = sg._Signature;

ok nvm I got it
var keyInBytes = CryptoBytes.FromHexString(key);

1 Like