1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-09 15:12:26 +08:00

feat: add HmacMd5WithBase64

This commit is contained in:
dudaodong
2023-07-28 17:53:46 +08:00
parent 0ae5d17a06
commit 31eb5f4d1f
5 changed files with 97 additions and 4 deletions

View File

@@ -65,6 +65,13 @@ func TestHmacMd5(t *testing.T) {
assert.Equal("5f4c9faaff0a1ad3007d9ddc06abe36d", HmacMd5("hello world", "12345"))
}
func TestHmacMd5WithBase64(t *testing.T) {
t.Parallel()
assert := internal.NewAssert(t, "TestHmacMd5WithBase64")
assert.Equal("6DQwbquJLYclJdSRinpjmg==", HmacMd5WithBase64("hello", "12345"))
}
func TestHmacSha1(t *testing.T) {
t.Parallel()