/// <summary> /// Déchiffre une liste de données. /// </summary> /// <param name="_cipheredData">Liste de données</param> /// <returns>List : Réussite -> Liste des données déchiffrées. Echec -> Valeur null.</returns> private static List <string> PlainData(List <byte[]> _cipheredData) { List <byte[]> cipheredData = _cipheredData; List <string> plainData = new List <string>(); byte[] passwordByte = Encoding.UTF8.GetBytes(VaultDatabase.UserPassword); // Déchiffre une liste de données. foreach (byte[] element in _cipheredData) { byte[] decryptedData = AESAlgorithm.DecryptData(passwordByte, element); plainData.Add(Encoding.UTF8.GetString(decryptedData).Replace("\0", string.Empty)); } return(plainData); }