basic common app packages
This commit is contained in:
25
crypto/hash_test.go
Normal file
25
crypto/hash_test.go
Normal file
@@ -0,0 +1,25 @@
|
||||
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)
|
||||
}
|
Reference in New Issue
Block a user