sender no longer needs file nonce

This commit is contained in:
Danny Coates 2018-01-31 11:12:36 -08:00
parent 545da556d2
commit 4fb4041f13
No known key found for this signature in database
GPG key ID: 4C442633C62E00CB
5 changed files with 20 additions and 28 deletions

View file

@ -1,12 +1,10 @@
import Nanobus from 'nanobus';
import { arrayToB64, b64ToArray } from './utils';
const encoder = new TextEncoder();
const decoder = new TextDecoder();
export default class Keychain extends Nanobus {
export default class Keychain {
constructor(secretKeyB64, nonce, ivB64) {
super('Keychain');
this._nonce = nonce || 'yRCdyQ1EMSA3mo4rqSkuNQ==';
if (ivB64) {
this.iv = b64ToArray(ivB64);
@ -85,7 +83,6 @@ export default class Keychain extends Nanobus {
set nonce(n) {
if (n && n !== this._nonce) {
this._nonce = n;
this.emit('nonceChanged');
}
}