@@ -21,11 +21,12 @@ type AesCrypto struct {
// key/iv length:16, 24, 32 bytes to AES-128, AES-192, AES-256
func SetAesCryptoKey(password, iv string) {
aesKey = password
+ aesIV = iv
}
-// GetAesCryptoKey get current key
-func GetAesCryptoKey() string {
- return aesKey
+// GetAesCryptoKey get current key/iv
+func GetAesCryptoKey() (string, string) {
+ return aesKey, aesIV
// NewAesCrypto new AesCrypto