async test, finding error for rngState 00b15fc0a8247e693d, due to failure in decompressing
This commit is contained in:
parent
b97ac08003
commit
30b7be0781
2 changed files with 13 additions and 7 deletions
|
@ -56,7 +56,7 @@ var a2zString = ['a','b','c','d','e','f','g','h','i','j','k','l','m',
|
||||||
mimeLine = '';
|
mimeLine = '';
|
||||||
|
|
||||||
// redirect console messages to log file
|
// redirect console messages to log file
|
||||||
console.info = console.warn = console.error = function () {
|
console.info = console.warn = function () {
|
||||||
logFile.write(Array.prototype.slice.call(arguments).join('') + '\n');
|
logFile.write(Array.prototype.slice.call(arguments).join('') + '\n');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -11,12 +11,18 @@ describe('CryptTool', function () {
|
||||||
'string',
|
'string',
|
||||||
'string',
|
'string',
|
||||||
'string',
|
'string',
|
||||||
async function (key, password, message) {
|
function (key, password, message) {
|
||||||
return message.trim() === await $.PrivateBin.CryptTool.decipher(
|
message = message.trim();
|
||||||
key,
|
return $.PrivateBin.CryptTool.cipher(
|
||||||
password,
|
key, password, message
|
||||||
await $.PrivateBin.CryptTool.cipher(key, password, message.trim())
|
).then(function(ciphertext) {
|
||||||
);
|
return $.PrivateBin.CryptTool.decipher(
|
||||||
|
key, password, ciphertext
|
||||||
|
).then(function(plaintext) {
|
||||||
|
if (message !== plaintext) console.log([message, plaintext]);
|
||||||
|
return message === plaintext;
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue