clientside implementation of block signing and encryption

This commit is contained in:
ansuz
2018-06-19 16:38:49 +02:00
parent 0365092aaf
commit 577dea4c75
6 changed files with 115 additions and 8 deletions

View File

@@ -222,7 +222,19 @@ define([
};
exp.writeLoginBlock = function (data, cb) {
cb();
if (!data) { return void cb('NO_DATA'); }
if (!data.publicKey || !data.signature || !data.ciphertext) {
console.log(data);
return void cb("MISSING_PARAMETERS");
}
rpc.send('WRITE_LOGIN_BLOCK', [
data.publicKey,
data.signature,
data.ciphertext
], function (e) {
cb(e);
});
};
cb(e, exp);