Switch to dotted syntax

This commit is contained in:
Matija Petrunic
2020-04-07 11:02:03 +02:00
parent 48a230b13e
commit 207627a31f
2 changed files with 3 additions and 3 deletions

View File

@ -49,7 +49,7 @@ export class Noise implements INoiseConnection {
this.useNoisePipes = false;
if (staticNoiseKey) {
const publicKey = Buffer.from(box.keyPair.fromSecretKey(staticNoiseKey)['publicKey']);
const publicKey = Buffer.from(box.keyPair.fromSecretKey(staticNoiseKey).publicKey);
this.staticKeys = {
privateKey: staticNoiseKey,
publicKey,

View File

@ -12,8 +12,8 @@ const NoiseHandshakePayloadProto = pb.NoiseHandshakePayload;
export function generateKeypair(): KeyPair {
const keyPair = box.keyPair();
const publicKey = Buffer.from(keyPair['publicKey']);
const privateKey = Buffer.from(keyPair['secretKey']);
const publicKey = Buffer.from(keyPair.publicKey);
const privateKey = Buffer.from(keyPair.secretKey);
return {
publicKey,