Created
Some checks failed
Go / build (push) Failing after 7s

This commit is contained in:
scheibling
2025-04-08 19:16:39 +02:00
commit b4eb50ab55
63 changed files with 7333 additions and 0 deletions

7
cryptox/crc32.go Normal file
View File

@@ -0,0 +1,7 @@
package cryptox
import "hash/crc32"
func Crc32(s string) uint32 {
return crc32.ChecksumIEEE([]byte(s))
}

12
cryptox/md5.go Normal file
View File

@@ -0,0 +1,12 @@
package cryptox
import (
"crypto/md5"
"encoding/hex"
)
func Md5(s string) string {
h := md5.New()
h.Write([]byte(s))
return hex.EncodeToString(h.Sum(nil))
}

12
cryptox/sha1.go Normal file
View File

@@ -0,0 +1,12 @@
package cryptox
import (
"crypto/sha1"
"encoding/hex"
)
func Sha1(s string) string {
h := sha1.New()
h.Write([]byte(s))
return hex.EncodeToString(h.Sum(nil))
}