V5.0.0
New Features
Revoke a transfer
It is now possible to revoke a transfer such that its files are no longer accessible by the recipients. In order to revoke a transfer, call either overload of Client.RevokeTransfer and, if necessary, specify whether the sender/recipient should be notified about the transfer revocation via email. Optionally, you may pass a message parameter to override the default notification message with a custom text. More information about revoking a transfer can be found here.
Provide custom IProtectionService implementation for protecting the contents of the client store
It is now possible to provide a custom implementation of IProtectionService when protecting the contents of the client store. We also provide the reference implementation AesProtectionService which allows the protection of a store using AES encryption with a chosen IKeySourceProvider. We also offer an IKeySourceProvider reference implementation called MachineGuidKeySourceProvider that uses the "Machine GUID" as the key source. More information about providing an IStore with a custom IProtectionService implementation can be found here.
New UploadFilesFinishedHandler callback
A new UploadFilesFinishedHandler callback parameter has been introduced to Client.PerformTransfer and Client.BeginTransfer. This handler is called as soon as the file upload is finished, but before the files are processed on the server. In summary, the server performs various processing tasks such as file encryption between the calls to UploadFilesFinishedHandler and UploadCompleteHandler.
Breaking Changes
-
Beginning with Cryptshare Server version 4.5.0, the CheckVerificationResult.UserVerified property should be used – the CheckVerificationResult.Verified property is now marked as obsolete. However, if your Cryptshare Server is below version 4.5.0, you must continue to use CheckVerificationResult.Verified until your server has been updated!
-
There has been a fundamental change to how client verifications are handled. If you are currently using the client verification mode und update the Cryptshare .NET API to version 5.0.0 and the Cryptshare Server to version 4.5.0, you must call Client.RequestClientVerification once and use the CheckVerificationRequest.UserVerified property to validate the verification state of your client. The client will not be in a verified state until Client.RequestClientVerification has been called once, even if the client ID has been whitelisted on the server before!
-
As described in the first bullet point, the property CheckVerificationResult.Verified has been obsoleted. While it still returns the expected result in most cases, you are required to use the new property CheckVerificationResult.UserVerified whenever you are using the client verification mode on Cryptshare Server version 4.5.0 (and higher).
-
The following code snippet shows an example on how to handle the verification state in the future:
CheckVerificationResult checkVerificationResult = client.CheckVerification();
if (!checkVerificationResult.UserVerified)
{
switch (checkVerificationResult.VerificationMode)
{
case VerificationMode.Sender:
Console.WriteLine($"Requesting a verification code for {client.UserEmailAddress}...");
client.RequestSenderVerification();
Console.WriteLine($"Please enter the code below and confirm with [Enter]:");
string code = Console.ReadLine().Trim();
client.ConfirmSenderVerification(code);
break;
case VerificationMode.Client:
if (checkVerificationResult.ClientVerificationAllowed)
{
client.RequestClientVerification();
}
else
{
throw new UnauthorizedAccessException(
$"Your client ID is not whitelisted. Please whitelist the following client ID before proceeding: {client.ClientId}"
);
}
break;
default:
break;
}