initial commit

This commit is contained in:
git@daemon.de
2013-09-12 23:13:49 +02:00
parent 874ee3cdab
commit 5992bf159b
50 changed files with 69273 additions and 0 deletions

11
js/security.js Executable file
View File

@@ -0,0 +1,11 @@
/* crypto helpers */
function pwhash(pass) {
/* get the clear text password, generate a salt
and hash them together. return the hash */
var salt = CryptoJS.lib.WordArray.random(128/8);
console.log("key: %s, salt: %s", pass, salt);
var key512iter32 = CryptoJS.PBKDF2(pass, salt,{ keySize: 512/32, iterations: 32, hasher: CryptoJS.algo.SHA512 });
return key512iter32;
}