Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging

pull/1/head
yflory 8 years ago
commit 408a4dad94

@ -258,6 +258,8 @@ define([
var src = Cryptpad.getBlobPathFromHex(hexFileName); var src = Cryptpad.getBlobPathFromHex(hexFileName);
return Cryptpad.fetch(src, function (e, u8) { return Cryptpad.fetch(src, function (e, u8) {
if (e) { return void Cryptpad.alert(e); } if (e) { return void Cryptpad.alert(e); }
// now decrypt the u8 // now decrypt the u8
var cryptKey = secret.keys && secret.keys.fileKeyStr; var cryptKey = secret.keys && secret.keys.fileKeyStr;
var key = Nacl.util.decodeBase64(cryptKey); var key = Nacl.util.decodeBase64(cryptKey);
@ -266,6 +268,7 @@ define([
return void Cryptpad.errorLoadingScreen(e); return void Cryptpad.errorLoadingScreen(e);
} }
return console.error(FileCrypto.decryptMetadata(u8, key));
FileCrypto.decrypt(u8, key, function (e, data) { FileCrypto.decrypt(u8, key, function (e, data) {
if (e) { if (e) {
return console.error(e); return console.error(e);

Loading…
Cancel
Save