添加md5流式计算
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user