MCPcopy Index your code
hub / github.com/Threadfin/Threadfin / SHA256

Function SHA256

src/internal/authentication/authentication.go:490–495  ·  view source on GitHub ↗

SHA256 : password + salt = sha256 string

(secret, salt string)

Source from the content-addressed store, hash-verified

488
489// SHA256 : password + salt = sha256 string
490func 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
497func randomString(n int) string {
498 const alphanum = "-AbCdEfGhIjKlMnOpQrStUvWxYz0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ_"

Callers 4

CreateNewUserFunction · 0.85
UserAuthenticationFunction · 0.85
ChangeCredentialsFunction · 0.85
defaultsForNewUserFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected