MCPcopy
hub / github.com/OpenListTeam/OpenList / StaticHash

Function StaticHash

internal/model/user.go:235–237  ·  view source on GitHub ↗
(password string)

Source from the content-addressed store, hash-verified

233}
234
235func StaticHash(password string) string {
236 return utils.HashData(utils.SHA256, []byte(fmt.Sprintf("%s-%s", password, StaticHashSalt)))
237}
238
239func HashPwd(static string, salt string) string {
240 return utils.HashData(utils.SHA256, []byte(fmt.Sprintf("%s-%s", static, salt)))

Callers 3

LoginFunction · 0.92
ValidateRawPasswordMethod · 0.85
TwoHashPwdFunction · 0.85

Calls 1

HashDataFunction · 0.92

Tested by

no test coverage detected