Copy of crypt.js v. 0.4.1 - 2012-01-04
https://github.com/Infocatcher/AkelPad_scripts/tree/99b52dae4c5e51d2c2c37803594f0ace65d06549/crypt.js
We're going to break backward compatibility, so it's better to have two different scripts.
Note: most of following commits are very old, but I prefer to leave them for historical purposes.
Use SHA-256 instead of SHA-512 (because of key length limit)
+ small optimizations
Add wrapper for AkelPad.Include()
Remove SHA() function, we already have Sha256.hash()
Use PBKDF2 + SHA-256 hash function
+ use "staticSalt" form crypt.ini (or registry)
Used code from https://github.com/bitwiseshiftleft/sjcl/
Tweak static salt generation
Hotkeys (F3, F4) + -focusPass argument + feedback in window title
F3 - select direction
F4 - select cryptor
Use unique salt each time + base64 converter from our converter.js
Salt and PBKDF2 iterations will be stored in data header
Arguments:
-PBKDF2Iterations
-saltLength
Localize + convert to utf-8 only once + small optimizations
Correctly work with padding + smapp optimizations + refactor feedback
Draft: use comboboxes to select cryptors
+ Twofish and Serpent (only in UI for now)
Improve wrapper for AkelPad.Include() + codes to use multiple ciphers
Add Twofish and Serpent ciphers
Based on code from http://ats.oka.nu/titaniumcore/js/crypto/Cipher.sample.html
+ change header:
<iterations><salt><data> => <salt><iterations><data>
(harder to autodetect correctly decoded data)
+ correct descriptions
Fixes for multiple ciphers + correct description
Make header less detectable
Fix select cryptor hotkey + change hotkeys
(F4 opens combobox by default)
Correct WM_SETFOCUS handling + remove obsolete code