From 24edcae2b36f67eb5c2b46169195cae2a98c52d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Tue, 12 Jul 2022 20:12:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E7=94=9F=E6=88=90=E9=9A=8F?= =?UTF-8?q?=E6=9C=BAmd5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- string.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/string.go b/string.go index 1670a3d..ac8e902 100644 --- a/string.go +++ b/string.go @@ -56,6 +56,15 @@ func (s *stringOperate) Md5(str string) string { return hex.EncodeToString(h.Sum(nil)) } +// GenRandomMd5 生成随机md5 +// +// Author : go_developer@163.com<白茶清欢> +// +// Date : 20:11 2022/7/12 +func (s *stringOperate) GenRandomMd5() string { + return s.Md5(s.GenRandom("", 16)) +} + // SnakeCaseToCamel 蛇形字符串转换为驼峰 // // Author : go_developer@163.com<白茶清欢>