appcore/crypto/hash_test.go
2025-06-16 22:26:47 +05:30

31 lines
487 B
Go

// Copyright 2024 Patial Tech (Ankit Patial).
//
// This file is part of code.patial.tech/go/appcore, which is MIT licensed.
// See http://opensource.org/licenses/MIT
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)
}