Created
February 9, 2013 15:19
-
-
Save bububa/4745678 to your computer and use it in GitHub Desktop.
pwdgen algorithm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
base62(base64(sha512(hexstr(md5(encrypt_key+encrypt_salt))+site_id+site_salt)))[0:len] | |
// base64 -> base62 | |
// 'i' -> "ii" | |
// '+' -> "ip" | |
// '/' -> "is" | |
// '=' -> "ie" | |
其中encrypt_key是用户输入的加密口令, base62是为了去掉特殊字符. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment