*Ensure we are parsing the public key in hex format

This commit is contained in:
Derrick Hammer 2022-11-19 20:35:23 -05:00
parent 15b088f481
commit a1d826e376
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 5 additions and 1 deletions

View File

@ -281,7 +281,11 @@ export default class DHTDataBase extends EventEmitter {
if (
signature &&
crypto.verify(b4a.from(`${timestamp}${data}`), signature, b4a.from(id))
crypto.verify(
b4a.from(`${timestamp}${data}`),
signature,
b4a.from(id, "hex")
)
) {
const parsedData = data ? orderedJSON.parse(data) : null;
let peerData = parsedData || {};