package main
import (
"bytes"
"crypto/aes"
"crypto/cipher"
"encoding/base64"
"fmt"
)
const (
key = "2018201820182018"
iv = "1234567887654321"
)
func main() {
str := "我勒个去"
es, _ := AesEncrypt(str, []byte(key))
fmt.Println(es)
ds, _ := AesDecrypt(es, []byte(key))
fmt.Println(string(ds))
}
Golang AES CBC 加密
最新推荐文章于 2024-08-11 10:35:23 发布