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
{{ message }}
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.
code:
final hashedPayload = hexToBytes(
'9ff86b8a0ac0cf4eda6b379ba9ef340f015c2f9760d42b9e8fa90251e0633b5a');
final privKey = hexToBytes(
'b5efd2c15d04f868f4a924653747f2b4cc4d818fdbb3960fcea10f29dac6215d');
final pkey = privateKeyToPublic(bytesToUnsignedInt(privKey));
final sig = sign(hashedPayload, privKey);
final sigbyte = encode_sig(sig);
print('sig.r:${HEX.encode(intToBytes(sig.r))},sig.s:${HEX.encode(intToBytes(sig.s))},sig.v:${sig.v},pkey:${HEX.encode(pkey)},sigbyte:${HEX.encode(sigbyte)}');
code:
final hashedPayload = hexToBytes(
'9ff86b8a0ac0cf4eda6b379ba9ef340f015c2f9760d42b9e8fa90251e0633b5a');
final privKey = hexToBytes(
'b5efd2c15d04f868f4a924653747f2b4cc4d818fdbb3960fcea10f29dac6215d');
final pkey = privateKeyToPublic(bytesToUnsignedInt(privKey));
final sig = sign(hashedPayload, privKey);
final sigbyte = encode_sig(sig);
print('sig.r:${HEX.encode(intToBytes(sig.r))},sig.s:${HEX.encode(intToBytes(sig.s))},sig.v:${sig.v},pkey:${HEX.encode(pkey)},sigbyte:${HEX.encode(sigbyte)}');
outout:
sig.r:00c4d74f1c1500f134a6312c6f3405d3a98fda0e4deb55bdebf71de6a27a105512,sig.s:69aca52d8f7623a235f09553cd1766599018e7bcba1cb2541ac629109c7e3614,sig.v:27,pkey:8a7620256588ee54d7ee152b76ae7f33d01b7d9fe183993c3be846f0edb4993b4ba5854b5940ed41cab7cb4582361f4858ea4a086634b4ecfd76dd4226d140a1,sigbyte:c4d74f1c1500f134a6312c6f3405d3a98fda0e4deb55bdebf71de6a27a10551269aca52d8f7623a235f09553cd1766599018e7bcba1cb2541ac629109c7e3614
HEX.encode(intToBytes(sig.r)) it should be:
"c4d74f1c1500f134a6312c6f3405d3a98fda0e4deb55bdebf71de6a27a105512"
The text was updated successfully, but these errors were encountered: