Backend security
const message = JSON.stringify({
signed_message: signedMessage,
authors: tokenObj.authors,
timestamp: tokenObj.timestamp,
})
let hash = cryptoUtils.sha256(message)
...
account[type].key_auths.forEach((key: string[]) => {
if (
!validSignature
&& PublicKey.fromString(key[0]).verify(hash, Signature.fromString(signature))
) {
validSignature = true;
}
});Last updated
Was this helpful?