|
@@ -38,7 +38,8 @@ func EncryptAES(key, data []byte) []byte {
|
|
|
}
|
|
|
|
|
|
// DecryptAES func
|
|
|
-func DecryptAES(key, ciphertext []byte) []byte {
|
|
|
+func DecryptAES(key, ori []byte) []byte {
|
|
|
+ ciphertext := make([]byte, len(ori))
|
|
|
block, err := aes.NewCipher(key)
|
|
|
if err != nil {
|
|
|
panic(fmt.Errorf("Error creating new block cipher\n%v\n", err))
|