Crypteron C# API
2015.6.1.0
|
This is the CipherDb Blob class for securing files in Blob storage via the same key management system More...
Public Member Functions | |
CipherStorExt (string securityPartition=Default.PartitionId, string asRole=Default.RoleId) | |
Creates a CipherStor class to allow for file or streaming based operations. More... | |
void | SetBlobTarget (string filename, string containerName, CloudStorageAccount cloudStorageAccount, bool addCipherStorFileExtension=true) |
If using Azure Blob (Binary Large OBject) storage, you can specify the location More... | |
void | EncryptStream (Stream clearInputStream, Stream encryptedOutputStream, bool compress=false, CancellationToken cancellationToken=default(CancellationToken), bool keepOutputStreamOpen=false) |
This will take an input stream and encrypt it to the output stream More... | |
void | DecryptStream (Stream encryptedInputStream, Stream clearOutputStream, CancellationToken cancellationToken=default(CancellationToken), bool keepInputStreamOpen=false) |
This decrypts an encrypted input stream to a clear output stream More... | |
void | EncryptLocalFile (string clearInputFile, string encryptedOutputFile, bool compress=false, CancellationToken cancellationToken=default(CancellationToken)) |
This will take an input file and encrypt it to another file More... | |
void | DecryptLocalFile (string encryptInFile, string clearOutFile, CancellationToken cancellationToken=default(CancellationToken)) |
This will take an encrypted file and decrypt it to another file More... | |
void | UploadFromFile (string filePath, bool compress=false, CancellationToken cancellationToken=default(CancellationToken)) |
void | DownloadToFile (string filePath, CancellationToken cancellationToken=default(CancellationToken)) |
void | UploadFromStream (Stream clearStream, [Optional] AccessCondition accessCondition, [Optional] BlobRequestOptions blobRequestOptions, [Optional] OperationContext operationContext, bool compress=false, CancellationToken cancellationToken=default(CancellationToken)) |
CipherStor API to upload a clear stream to Blob Storage as an encrypted blob More... | |
void | DownloadToStream (Stream clearStream, [Optional] AccessCondition accessCondition, [Optional] BlobRequestOptions blobRequestOptions, [Optional] OperationContext operationContext, CancellationToken cancellationToken=default(CancellationToken)) |
CipherStor API to download an encrypted blob as a clear stream. The downloading and decryption happens on the fly. Errors, if any, will be presented as exceptions. More... | |
Events | |
EventHandler< CipherCoreEventArgs > | RaiseProgressEvent |
An event is you want to be notified of ongoing progress. The reporting internal This is configured in your config file within the cipherStorConfig via the ReportEveryXBytes parameter More... | |
This is the CipherDb Blob class for securing files in Blob storage via the same key management system
Crypteron.CipherStor.CipherStorExt.CipherStorExt | ( | string | securityPartition = Default.PartitionId , |
string | asRole = Default.RoleId |
||
) |
Creates a CipherStor class to allow for file or streaming based operations.
securityPartition | Optional argument specifying the security partition this object should be sealed for. If not specified, the default security partition is used. |
asRole | Optional argument specifying the role that should be sealing this object. If not specified, the default role is used. |
void Crypteron.CipherStor.CipherStorExt.DecryptLocalFile | ( | string | encryptInFile, |
string | clearOutFile, | ||
CancellationToken | cancellationToken = default(CancellationToken) |
||
) |
This will take an encrypted file and decrypt it to another file
encryptInFile | The encrypted input file |
clearOutFile | Teh clear output file |
cancellationToken | Optionally allow for cancellations |
void Crypteron.CipherStor.CipherStorExt.DecryptStream | ( | Stream | encryptedInputStream, |
Stream | clearOutputStream, | ||
CancellationToken | cancellationToken = default(CancellationToken) , |
||
bool | keepInputStreamOpen = false |
||
) |
This decrypts an encrypted input stream to a clear output stream
encryptedInputStream | The encrypted input stream |
clearOutputStream | The clear output stream |
cancellationToken | Optionally allow for cancellations |
keepInputStreamOpen | Keep the input encrypted stream open at the end of the operation |
void Crypteron.CipherStor.CipherStorExt.DownloadToFile | ( | string | filePath, |
CancellationToken | cancellationToken = default(CancellationToken) |
||
) |
filePath | |
cancellationToken | Optionally allow for cancellations |
void Crypteron.CipherStor.CipherStorExt.DownloadToStream | ( | Stream | clearStream, |
[Optional] AccessCondition | accessCondition, | ||
[Optional] BlobRequestOptions | blobRequestOptions, | ||
[Optional] OperationContext | operationContext, | ||
CancellationToken | cancellationToken = default(CancellationToken) |
||
) |
CipherStor API to download an encrypted blob as a clear stream. The downloading and decryption happens on the fly. Errors, if any, will be presented as exceptions.
clearStream | The stream which will bear the decrypted contents of the encrypted blob. |
accessCondition | Access Conditions per Core Azure Storage API. Represents a set of access conditions to be used for operations against the storage services. |
blobRequestOptions | Blob request options per Core Azure Storage API. Represents a set of timeout and retry policy options that may be specified for a blob operation request. |
operationContext | Operation Context per Core Azure Storage API. Represents the context for a request to the storage service and provides additional runtime information about its execution. |
cancellationToken | Optionally allow for cancellations |
void Crypteron.CipherStor.CipherStorExt.EncryptLocalFile | ( | string | clearInputFile, |
string | encryptedOutputFile, | ||
bool | compress = false , |
||
CancellationToken | cancellationToken = default(CancellationToken) |
||
) |
This will take an input file and encrypt it to another file
clearInputFile | The clear input file |
encryptedOutputFile | The encrypted output file |
compress | Optionally enable compression |
cancellationToken | Optionally allow for cancellations |
void Crypteron.CipherStor.CipherStorExt.EncryptStream | ( | Stream | clearInputStream, |
Stream | encryptedOutputStream, | ||
bool | compress = false , |
||
CancellationToken | cancellationToken = default(CancellationToken) , |
||
bool | keepOutputStreamOpen = false |
||
) |
This will take an input stream and encrypt it to the output stream
clearInputStream | The clear input stream |
encryptedOutputStream | The encrypted output stream |
compress | Optionally enable compression |
cancellationToken | Optionally allow for cancellations |
keepOutputStreamOpen | Optionally keep the output stream open |
void Crypteron.CipherStor.CipherStorExt.SetBlobTarget | ( | string | filename, |
string | containerName, | ||
CloudStorageAccount | cloudStorageAccount, | ||
bool | addCipherStorFileExtension = true |
||
) |
If using Azure Blob (Binary Large OBject) storage, you can specify the location
filename | The name of the resulting Blob |
containerName | The container within which the Blob resides |
cloudStorageAccount | Your blob storage account |
addCipherStorFileExtension | Add the CipherStor file extension to indicate the Blob's encrypted state |
void Crypteron.CipherStor.CipherStorExt.UploadFromFile | ( | string | filePath, |
bool | compress = false , |
||
CancellationToken | cancellationToken = default(CancellationToken) |
||
) |
filePath | |
compress | |
cancellationToken | Optionally allow for cancellations |
void Crypteron.CipherStor.CipherStorExt.UploadFromStream | ( | Stream | clearStream, |
[Optional] AccessCondition | accessCondition, | ||
[Optional] BlobRequestOptions | blobRequestOptions, | ||
[Optional] OperationContext | operationContext, | ||
bool | compress = false , |
||
CancellationToken | cancellationToken = default(CancellationToken) |
||
) |
CipherStor API to upload a clear stream to Blob Storage as an encrypted blob
clearStream | The clear stream to be encrypted |
accessCondition | Access Conditions per Core Azure Storage API. Represents a set of access conditions to be used for operations against the storage services. |
blobRequestOptions | Blob request options per Core Azure Storage API. Represents a set of timeout and retry policy options that may be specified for a blob operation request. |
operationContext | Operation Context per Core Azure Storage API. Represents the context for a request to the storage service and provides additional runtime information about its execution. |
compress | Enable compressed encryption |
cancellationToken | Optionally allow for cancellations |
EventHandler< CipherCoreEventArgs> Crypteron.CipherStor.CipherStorExt.RaiseProgressEvent |
An event is you want to be notified of ongoing progress. The reporting internal This is configured in your config file within the cipherStorConfig
via the ReportEveryXBytes
parameter