SHA256 : password + salt = sha256 string
(secret, salt string)
| 488 | |
| 489 | // SHA256 : password + salt = sha256 string |
| 490 | func SHA256(secret, salt string) string { |
| 491 | key := []byte(secret) |
| 492 | h := hmac.New(sha256.New, key) |
| 493 | h.Write([]byte("_remote_db")) |
| 494 | return base64.StdEncoding.EncodeToString(h.Sum(nil)) |
| 495 | } |
| 496 | |
| 497 | func randomString(n int) string { |
| 498 | const alphanum = "-AbCdEfGhIjKlMnOpQrStUvWxYz0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ_" |
no outgoing calls
no test coverage detected