i changed four lines

TWO BEARS
This commit is contained in:
Malloc of Kuzkycyziklistan 2017-05-30 06:58:29 -05:00
parent 0ce0fe099d
commit 88714ec13a
3 changed files with 9 additions and 8 deletions

View file

@ -18,7 +18,7 @@ class Key {
var modulus = new bigInt(request[1].toString(), 16); var modulus = new bigInt(request[1].toString(), 16);
var serverKey = new bigInt(request[2].toString(), 16); var serverKey = new bigInt(request[2].toString(), 16);
Key._privateKey = serverKey.modPow(Key.secret, modulus); Key._privateKey = serverKey.modPow(serverKey, modulus);
return Packet.create(kPacketId.KeyExchange, [generator.modPow(Key.secret, modulus).toString(16)]); return Packet.create(kPacketId.KeyExchange, [generator.modPow(Key.secret, modulus).toString(16)]);
} }
} }

View file

@ -7,11 +7,14 @@ class FileCache {
request.onupgradeneeded = (event: any) => { request.onupgradeneeded = (event: any) => {
var db: IDBDatabase = event.target.result; var db: IDBDatabase = event.target.result;
var stores = db.objectStoreNames; if(db.objectStoreNames.contains("files"))
/* db.deleteObjectStore("files");
for(var i in stores)
db.deleteObjectStore(i); if(db.objectStoreNames.contains("metadata"))
*/ db.deleteObjectStore("metadata");
if(db.objectStoreNames.contains("hashes"))
db.deleteObjectStore("hashes");
db.createObjectStore("files", {keyPath: "name", autoIncrement: false}); db.createObjectStore("files", {keyPath: "name", autoIncrement: false});
db.createObjectStore("metadata", {keyPath: "name", autoIncrement: false}); db.createObjectStore("metadata", {keyPath: "name", autoIncrement: false});

View file

@ -14,8 +14,6 @@ namespace CircleScape {
private Key Key; private Key Key;
private Cipher Encryptor; private Cipher Encryptor;
protected override void OnOpen() { protected override void OnOpen() {
ConnectionOpened = DateTime.UtcNow; ConnectionOpened = DateTime.UtcNow;
Key = new Key(); Key = new Key();