appcore/crypto/hash_test.go

26 lines
319 B
Go
Raw Normal View History

2025-06-16 22:19:00 +05:30
package crypto
import "testing"
func TestMD5(t *testing.T) {
b := []byte("hello there")
h := MD5(b)
if h == "" {
t.Error("failed to hasg")
return
}
println(h)
}
func TestSha256(t *testing.T) {
b := []byte("hello there")
h := SHA256(b)
if h == "" {
t.Error("failed to hasg")
return
}
println(h)
}