MCPcopy Create free account
hub / github.com/gogs/gogs / HashEmail

Function HashEmail

internal/tool/tool.go:123–125  ·  view source on GitHub ↗

HashEmail hashes email address to MD5 string. https://en.gravatar.com/site/implement/hash/

(email string)

Source from the content-addressed store, hash-verified

121// HashEmail hashes email address to MD5 string.
122// https://en.gravatar.com/site/implement/hash/
123func HashEmail(email string) string {
124 return cryptoutil.MD5(strings.ToLower(strings.TrimSpace(email)))
125}
126
127// AvatarLink returns relative avatar link to the site domain by given email,
128// which includes app sub-url as prefix. However, it is possible

Callers 1

AvatarLinkFunction · 0.85

Calls 1

MD5Function · 0.92

Tested by

no test coverage detected