You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
337 B
23 lines
337 B
package request
|
|
|
|
import "gitea.drugeyes.vip/pharnexbase/tools/utils"
|
|
|
|
type md5 struct{}
|
|
|
|
type sha1 struct{}
|
|
|
|
func NewMD5HashAlg() *md5 {
|
|
return &md5{}
|
|
}
|
|
|
|
func NewSHA1HashAlg() *sha1 {
|
|
return &sha1{}
|
|
}
|
|
|
|
func (m *md5) Hash(str string) string {
|
|
return utils.Md5(str)
|
|
}
|
|
|
|
func (s *sha1) Hash(str string) string {
|
|
return utils.Sha1(str)
|
|
}
|
|
|