![]() |
VOOZH | about |
dotnet add package OutWit.Communication.Client.Encryption.BouncyCastle --version 2.3.3
NuGet\Install-Package OutWit.Communication.Client.Encryption.BouncyCastle -Version 2.3.3
<PackageReference Include="OutWit.Communication.Client.Encryption.BouncyCastle" Version="2.3.3" />
<PackageVersion Include="OutWit.Communication.Client.Encryption.BouncyCastle" Version="2.3.3" />Directory.Packages.props
<PackageReference Include="OutWit.Communication.Client.Encryption.BouncyCastle" />Project file
paket add OutWit.Communication.Client.Encryption.BouncyCastle --version 2.3.3
#r "nuget: OutWit.Communication.Client.Encryption.BouncyCastle, 2.3.3"
#:package OutWit.Communication.Client.Encryption.BouncyCastle@2.3.3
#addin nuget:?package=OutWit.Communication.Client.Encryption.BouncyCastle&version=2.3.3Install as a Cake Addin
#tool nuget:?package=OutWit.Communication.Client.Encryption.BouncyCastle&version=2.3.3Install as a Cake Tool
Cross-platform BouncyCastle-based encryption for WitRPC client, providing RSA/AES encryption that works in Blazor WebAssembly and all .NET platforms.
OutWit.Communication.Client.Encryption.BouncyCastle provides a cross-platform encryption implementation using the BouncyCastle cryptography library. Unlike the standard .NET encryption which relies on platform-specific crypto APIs, BouncyCastle is a pure C# implementation that works everywhere, including:
The encryption uses RSA-OAEP (with SHA-256) for secure key exchange and AES-CBC for symmetric message encryption, providing end-to-end encryption for WitRPC communication.
Install-Package OutWit.Communication.Client.Encryption.BouncyCastle
Use the extension method for the simplest setup:
using OutWit.Communication.Client;
using OutWit.Communication.Client.Encryption.BouncyCastle;
var client = WitClientBuilder.Build(options =>
{
options.WithWebSocket("ws://localhost:5000");
options.WithJson();
options.WithBouncyCastleEncryption(); // Simple extension method
});
await client.ConnectAsync(TimeSpan.FromSeconds(5), CancellationToken.None);
In Blazor WebAssembly, simply use the BouncyCastle encryption - no JavaScript interop needed:
// Program.cs
var client = WitClientBuilder.Build(options =>
{
options.WithWebSocket("ws://your-server:5000");
options.WithJson();
options.WithBouncyCastleEncryption(); // Works in WASM!
});
BouncyCastle encryption is NOT compatible with standard .NET encryption.
When using WithBouncyCastleEncryption() on the client, you must also use WithBouncyCastleEncryption() on the server:
// Server configuration (required!)
var server = WitServerBuilder.Build(options =>
{
options.WithWebSocket("http://localhost:5000", maxClients: 100);
options.WithJson();
options.WithBouncyCastleEncryption(); // Must match client!
options.WithService(myService);
});
| Client Encryption | Server Encryption | Compatible? |
|---|---|---|
WithBouncyCastleEncryption() |
WithBouncyCastleEncryption() |
? Yes |
WithBouncyCastleEncryption() |
WithEncryption() |
? No |
WithEncryption() |
WithEncryption() |
? Yes |
WithEncryption() |
WithBouncyCastleEncryption() |
? No |
Use BouncyCastle encryption when:
Use standard encryption (WithEncryption()) when:
For more about WitRPC encryption and cross-platform support, see the official documentation on witrpc.io.
Licensed under the Apache License, Version 2.0. See LICENSE.
If you use OutWit.Communication.Client.Encryption.BouncyCastle in a product, a mention is appreciated (but not required), for example: "Powered by WitRPC (https://witrpc.io/)".
"WitRPC" and the WitRPC logo are used to identify the official project by Dmitry Ratner.
You may:
You may not:
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 net6.0 is compatible. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 is compatible. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.