CryptEncoderSSHA512 encodes a password with SHA512 with the configured salt
(salt string)
| 109 | // CryptEncoderSSHA512 encodes a password with SHA512 |
| 110 | // with the configured salt |
| 111 | func CryptEncoderSSHA512(salt string) func(pass []byte, hash interface{}) []byte { |
| 112 | return func(pass []byte, hash interface{}) []byte { |
| 113 | s := []byte(salt) |
| 114 | p := append(pass, s...) |
| 115 | h := sha512.Sum512(p) |
| 116 | return h[:] |
| 117 | } |
| 118 | } |
| 119 | |
| 120 | // EOF |
no outgoing calls