添加md5流式计算

This commit is contained in:
Yun
2024-03-15 13:49:58 +08:00
parent be8a2f84bd
commit 8b8575566b
3 changed files with 21 additions and 2 deletions
+11
View File
@@ -10,6 +10,10 @@ import (
func TestAes(t *testing.T) {
key := "example key 1234"
plaintext := "exampleplaintext"
// aesx.AesEncrypt(plaintext,key)
// aesx.AesDecrypt()
ciphertext, err := aesx.AESCBCEncrypt(key, plaintext)
fmt.Println(ciphertext, err)
@@ -23,3 +27,10 @@ func TestAes(t *testing.T) {
plaintext, err = aesx.AESGCMDecrypter(key, ciphertext, noncetext)
fmt.Println(plaintext, err)
}
func TestDemo(t *testing.T) {
c := []byte("08I2GfoqfIlUYgteelimxQ")
c := []byte("rRq++jXDMPDVcUkXAZA9kg==:o57DgQ+iQMXpERuShWs/XA==")
a,e := aesx.AesDecrypt(c, k)
fmt.Println(a,e)
}