Skip to content

Commit 8bac51d

Browse files
committed
MD5 Test & Base64 Decode Fix
1 parent 69cfe55 commit 8bac51d

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

tests/Encryption/Base64Decode/Base64Decode_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"github.com/serkanalgur/phpfuncs"
77
)
88

9-
// TestBase64Encode - Test for Encryption
9+
// TestBase64Decode - Test for Encryption
1010
func TestBase64Decode(t *testing.T){
1111
want := "Hello World"
1212
if got, _ := phpfuncs.Base64Decode("SGVsbG8gV29ybGQ="); got != want {

tests/Encryption/MD5/MD5_test.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package phpfuncs
2+
3+
import (
4+
"testing"
5+
6+
"github.com/serkanalgur/phpfuncs"
7+
)
8+
9+
// TestMD5 - Test for Encryption
10+
func TestMD5(t *testing.T){
11+
want := "b10a8db164e0754105b7a99be72e3fe5"
12+
if got := phpfuncs.MD5("Hello World"); got != want {
13+
t.Errorf("MD5() = %v, want %v", got, want)
14+
}
15+
}

0 commit comments

Comments
 (0)