# HG changeset patch # User Laman # Date 2019-07-05 23:58:20 # Node ID 5c8fceb4e291b6db97bfe3398b447d4cce9c7bbd # Parent a9595f817d39f299ac9fe6243fc46e905df27be4 I/O, user interface 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;} }