aboutsummaryrefslogtreecommitdiff
path: root/internal/tool/tool.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/tool/tool.go')
-rw-r--r--internal/tool/tool.go8
1 files changed, 0 insertions, 8 deletions
diff --git a/internal/tool/tool.go b/internal/tool/tool.go
index e5825018..6f86f6bb 100644
--- a/internal/tool/tool.go
+++ b/internal/tool/tool.go
@@ -25,14 +25,6 @@ import (
"gogs.io/gogs/internal/conf"
)
-// SHA1 encodes string to SHA1 hex value.
-// TODO: Move to cryptoutil.SHA1.
-func SHA1(str string) string {
- h := sha1.New()
- _, _ = h.Write([]byte(str))
- return hex.EncodeToString(h.Sum(nil))
-}
-
// ShortSHA1 truncates SHA1 string length to at most 10.
func ShortSHA1(sha1 string) string {
if len(sha1) > 10 {