mirror of
https://github.com/wyx2685/V2bX.git
synced 2026-11-04 17:10:21 +00:00
add encrypt private command
This commit is contained in:
1 parent
15efffba0d
commit
97a420f9f3
3 files changed
+28
-5
No files matched your search
+2
-2
@@ -10,7 +10,7 @@ func AesEncrypt(data []byte, key []byte) (string, error) {
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
en := make([]byte, 0, len(data))
|
||||
en := make([]byte, len(data))
|
||||
a.Encrypt(en, data)
|
||||
return base64.StdEncoding.EncodeToString(en), nil
|
||||
}
|
||||
@@ -24,7 +24,7 @@ func AesDecrypt(data string, key []byte) (string, error) {
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
de := make([]byte, 0, len(data))
|
||||
de := make([]byte, len(data))
|
||||
a.Decrypt(de, d)
|
||||
return string(de), nil
|
||||
}
|
||||
Reference in new issue
Block a user