You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, probably missing something obvious and sorry to bother you but I'm trying to use the extracted public key from a personal_sign'ed message to encrypt a return message to a user... but the public key returned by extractPublicKey is a 130 byte hex-encoded string (starting with 0x4) whereas the encrypt method requires the public key be a 44 character (base64 encoded?) string. Am I missing something terribly obvious? I cannot figure out how to convert the hex-encoded to the 44 character version.
Run into this issue when using the encrypt method, namely the error "Uncaught Error: bad public key size". I was told Buffer.from({128charHexPubKey} 'hex')).toString('base64') but it doesn't work.
Run into this issue when using the encrypt method, namely the error "Uncaught Error: bad public key size". I was told Buffer.from({128charHexPubKey} 'hex')).toString('base64') but it doesn't work.
encrypt in eth-sig-util uses the encryptionPublicKey, not the wallet's public key. It's a different encryption scheme.
Hi, probably missing something obvious and sorry to bother you but I'm trying to use the extracted public key from a personal_sign'ed message to encrypt a return message to a user... but the public key returned by
extractPublicKey
is a 130 byte hex-encoded string (starting with 0x4) whereas theencrypt
method requires the public key be a 44 character (base64 encoded?) string. Am I missing something terribly obvious? I cannot figure out how to convert the hex-encoded to the 44 character version.produces the following output:
When I export my public key from metamask I receive
+5ar2xujBQQPv+RTRU2tzO6sjSuTMZSosAx5NAdfkw0=
Thanks in advance anyone who can point me in the right direction! <3
The text was updated successfully, but these errors were encountered: