public Stream CreateWritableEncryptedStream(string fileName, SecureString passphrase) { var outputStream = new FileStream(fileName, FileMode.Create, FileAccess.Write, FileShare.ReadWrite, 4096, FileOptions.Asynchronous); return(CipherStream.Create(outputStream, SecureStringCredentialStore.SecureStringToString(passphrase))); }