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.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/tool/tool.go b/internal/tool/tool.go
index 380f1069..eeed80e6 100644
--- a/internal/tool/tool.go
+++ b/internal/tool/tool.go
@@ -28,6 +28,7 @@ import (
)
// MD5Bytes encodes string to MD5 bytes.
+// TODO: Move to hashutil.MD5Bytes.
func MD5Bytes(str string) []byte {
m := md5.New()
_, _ = m.Write([]byte(str))
@@ -35,11 +36,13 @@ func MD5Bytes(str string) []byte {
}
// MD5 encodes string to MD5 hex value.
+// TODO: Move to hashutil.MD5.
func MD5(str string) string {
return hex.EncodeToString(MD5Bytes(str))
}
// SHA1 encodes string to SHA1 hex value.
+// TODO: Move to hashutil.SHA1.
func SHA1(str string) string {
h := sha1.New()
_, _ = h.Write([]byte(str))