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; this.useNoisePipes = false;
if (staticNoiseKey) { if (staticNoiseKey) {
const publicKey = Buffer.from(box.keyPair.fromSecretKey(staticNoiseKey)['publicKey']); const publicKey = Buffer.from(box.keyPair.fromSecretKey(staticNoiseKey).publicKey);
this.staticKeys = { this.staticKeys = {
privateKey: staticNoiseKey, privateKey: staticNoiseKey,
publicKey, publicKey,

View File

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