diff --git a/src/index.ts b/src/index.ts index 5057e53..dff7e09 100644 --- a/src/index.ts +++ b/src/index.ts @@ -320,7 +320,7 @@ export default class DHTCache extends EventEmitter { let bufId = b4a.from(toId as Uint8Array) as Buffer; - if (!(signature && crypto.verify(bufData, signature, id))) { + if (!(signature && crypto.verify(bufData, signature, bufId))) { return; }