mirror of
https://github.com/fluencelabs/js-libp2p-noise
synced 2025-04-25 04:02:21 +00:00
Fix key buffer comparison
This commit is contained in:
parent
99d3c769c9
commit
2745783db3
@ -111,7 +111,7 @@ export function getHkdf(ck: bytes32, ikm: bytes): Hkdf {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function isValidPublicKey(pk: bytes): boolean {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user