cryptocoinjs / secp256k1-node

Node.js binding for an Optimized C library for EC operations on curve secp256k1
Other
341 stars 120 forks source link

it can only sign 32bytes data? #156

Closed yjjnls closed 4 years ago

yjjnls commented 4 years ago

as mentioned, when I sigh data not 32bytes, it raises: "RangeError: message length is invalid"

junderw commented 4 years ago

you must hash the data you wish to sign first.

SHA256 is most commonly used.