Class FileCryptor
Encrypt file/Decrypt file
Inherited Members
Namespace: Pixiv.VroidSdk.Crypt
Assembly: Pixiv.VroidSdk.dll
Syntax
public class FileCryptor : IFileReadWrite, IFileRead, IFileWrite
Constructors
FileCryptor(PasswordGenerator)
Constructor
Declaration
public FileCryptor(PasswordGenerator generator)
Parameters
Type | Name | Description |
---|---|---|
PasswordGenerator | generator | Password generator for file encryption |
Methods
IsFileExist(String)
Check if file exists
Declaration
public bool IsFileExist(string path)
Parameters
Type | Name | Description |
---|---|---|
String | path |
Returns
Type | Description |
---|---|
Boolean | File exists or not |
Load(String)
Load file
Declaration
public byte[] Load(string path)
Parameters
Type | Name | Description |
---|---|---|
String | path |
Returns
Type | Description |
---|---|
Byte[] | Decrypted binary |
Exceptions
Type | Condition |
---|---|
FileNotFoundException | File does not exist |
Save(String, Byte[])
Save file in specified location
Declaration
public void Save(string path, byte[] data)
Parameters
Type | Name | Description |
---|---|---|
String | path | |
Byte[] | data | Binary to be saved |