public static void InitializeEncryption(string filePath, byte[] passwordBytes, BackgroundWorker bgwEncryption) { string encryptedFilePath = GetEncryptedFilePath(filePath); byte[] salt = Generate.Salt(); (byte[] encryptionKey, byte[] macKey) = KeyDerivation.DeriveKeys(passwordBytes, salt, Globals.Iterations, Globals.MemorySize); EncryptFile(filePath, encryptedFilePath, salt, encryptionKey, macKey, bgwEncryption); }
private static void GetBenchmarkInputs(out byte[] passwordBytes, out byte[] salt) { char[] password = "******".ToCharArray(); passwordBytes = FileEncryption.GetPasswordBytes(password); salt = Generate.Salt(); }