diff --git a/src/utils.ts b/src/utils.ts index 3c25349..51426fa 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -111,7 +111,7 @@ export function getHkdf(ck: bytes32, ikm: bytes): Hkdf { } export function isValidPublicKey(pk: bytes): boolean { - if(pk.length !== 32 || pk.compare(Buffer.alloc(32))){ + if(pk.length !== 32 || pk.equals(Buffer.alloc(32))){ return false; }