ls 4 lat temu
rodzic
commit
eedaf1fa22
1 zmienionych plików z 4 dodań i 3 usunięć
  1. 4 3
      crypto.go

+ 4 - 3
crypto.go

@@ -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