using System.Text; namespace ReleaseBuilder; public static class EncryptionHelper { /// /// Decrypts the contents of the password file, using the given password and returns the file contents as a string /// /// The password file to decrypt /// The password to decrypt with /// The file contents public static string DecryptPasswordFile(string passwordfile, string password) { using var ms = new MemoryStream(); using var fs = File.OpenRead(passwordfile); SharpAESCrypt.SharpAESCrypt.Decrypt(password, fs, ms); return Encoding.UTF8.GetString(ms.ToArray()); } }