This is a created article in which the information may have evolved or changed.
For the CSDN and other major sites to save passwords for the problem,
Wrote a password generation tool Pwdgen (support for generating keepass format) in the Go language.
Here is the code that generates the algorithm and implementation:
// base58(sha512(md5hex(encrypt_key+encrypt_salt)+site_id+site_salt)[0:16]func pwdgen(site_id, site_salt, encrypt_key, encrypt_salt string) string { md5 := md5.New() md5.Write([]byte(encrypt_key + encrypt_salt)) md5Hex := fmt.Sprintf("%x", md5.Sum(nil)) sha := sha512.New() sha.Write([]byte(md5Hex + site_id + site_salt)) shaSum := sha.Sum(nil) pwd := base58.EncodeBase58(shaSum)[0:16] return string(pwd)}
For a complete program, visit: Https://bitbucket.org/chai2010/pwdgen/wiki/Home
For online documentation, please visit:
- Http://godoc.org/bitbucket.org/chai2010/pwdgen
- Http://godoc.org/bitbucket.org/chai2010/pwdgen/base58
- Http://godoc.org/bitbucket.org/chai2010/pwdgen/ini