C# Class BudgetAnalyser.Encryption.FileEncryptor

Inheritance: IFileEncryptor
显示文件 Open project: Benrnz/BudgetAnalyser

Public Methods

Method Description
EncryptFileAsync ( string sourceFile, string destinationFile, SecureString passphrase ) : System.Threading.Tasks.Task
LoadEncryptedFileAsync ( string fileName, SecureString passphrase ) : Task
LoadFirstLinesFromDiskAsync ( string fileName, int lineCount, SecureString passphrase ) : Task
SaveStringDataToEncryptedFileAsync ( string fileName, string data, SecureString passphrase ) : System.Threading.Tasks.Task

Protected Methods

Method Description
FileExists ( string fileName ) : bool

Private Methods

Method Description
CreateWritableEncryptedStream ( string fileName, SecureString passphrase ) : Stream

Method Details

EncryptFileAsync() public method

public EncryptFileAsync ( string sourceFile, string destinationFile, SecureString passphrase ) : System.Threading.Tasks.Task
sourceFile string
destinationFile string
passphrase System.Security.SecureString
return System.Threading.Tasks.Task

FileExists() protected method

protected FileExists ( string fileName ) : bool
fileName string
return bool

LoadEncryptedFileAsync() public method

public LoadEncryptedFileAsync ( string fileName, SecureString passphrase ) : Task
fileName string
passphrase System.Security.SecureString
return Task

LoadFirstLinesFromDiskAsync() public method

public LoadFirstLinesFromDiskAsync ( string fileName, int lineCount, SecureString passphrase ) : Task
fileName string
lineCount int
passphrase System.Security.SecureString
return Task

SaveStringDataToEncryptedFileAsync() public method

public SaveStringDataToEncryptedFileAsync ( string fileName, string data, SecureString passphrase ) : System.Threading.Tasks.Task
fileName string
data string
passphrase System.Security.SecureString
return System.Threading.Tasks.Task