NodeHash is a number
This commit is contained in:
@@ -13,6 +13,9 @@ const SHARED_SECRET_SIZE = 32;
|
||||
const SIGNATURE_SIZE = 64;
|
||||
const STATIC_SECRET_SIZE = 32;
|
||||
|
||||
// The "Public" group is a special group that all nodes are implicitly part of.
|
||||
const publicSecret = hexToBytes("8b3387e9c5cdea6ac9e5edbaa115cd72", 16);
|
||||
|
||||
export class PublicKey implements IPublicKey {
|
||||
public key: Uint8Array;
|
||||
|
||||
@@ -194,7 +197,7 @@ export class SharedSecret implements ISharedSecret {
|
||||
|
||||
static fromName(name: string): SharedSecret {
|
||||
if (name === "Public") {
|
||||
return new SharedSecret(hexToBytes("8b3387e9c5cdea6ac9e5edbaa115cd72", 16));
|
||||
return new SharedSecret(publicSecret);
|
||||
} else if (!/^#/.test(name)) {
|
||||
throw new Error("Only the 'Public' group or groups starting with '#' are supported");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user