diff --git a/dist/crypto.html b/dist/crypto.html --- a/dist/crypto.html +++ b/dist/crypto.html @@ -3,18 +3,45 @@ Chacha20 +
- - - - - + + +
+ + +
+
+ diff --git a/src/main.js b/src/main.js --- a/src/main.js +++ b/src/main.js @@ -26,8 +26,8 @@ function decrypt(s,password){ let salt=arr.slice(18,30); let ciphertext=arr.slice(30); let check=blake2s([version,iters].concat(salt,ciphertext),16,pass); - if(!signature.every((b,i)=>b===check[i])){return false;} - if(version>VERSION){return false;} + if(!signature.every((b,i)=>b===check[i])){return 1;} + if(version>VERSION){return 2;} let key=pbkdf2(pass,salt,1<=500){break;} }