Answer the question
In order to leave comments, you need to log in
Error dataSha256: 32 byte buffer requred, eosjs-ecc. How to decide?
There is a function
const data = ecc.sha256(value)
return ecc.signHash(data, key, 'base64'))
Error: dataSha256: 32 byte buffer requred
at Function.push../node_modules/eosjs-ecc/lib/signature.js.Signature.signHash (signature.js:239)
at Object.signHash (api_common.js:136)
at createSign (KeyUtils.ts:27)
at AuthService.ts:12
Answer the question
In order to leave comments, you need to log in
The output turned out to be a simple btoa(ecc.signHash(ecc.sha256(value), key)) and no buffer needed
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question