public static void InitializeEncryption(string filePath, byte[] passwordBytes, BackgroundWorker bgwEncryption) { string encryptedFilePath = GetEncryptedFilePath(filePath); byte[] salt = Generate.Salt(); byte[] nonce = Generate.Nonce(); var keys = KeyDerivation.DeriveKeys(passwordBytes, salt, Globals.Iterations, Globals.MemorySize); EncryptFile(filePath, encryptedFilePath, salt, nonce, keys, bgwEncryption); }