![]() |
VOOZH | about |
dotnet add package OutWit.Communication.Server.Encryption.BouncyCastle --version 2.3.4
NuGet\Install-Package OutWit.Communication.Server.Encryption.BouncyCastle -Version 2.3.4
<PackageReference Include="OutWit.Communication.Server.Encryption.BouncyCastle" Version="2.3.4" />
<PackageVersion Include="OutWit.Communication.Server.Encryption.BouncyCastle" Version="2.3.4" />Directory.Packages.props
<PackageReference Include="OutWit.Communication.Server.Encryption.BouncyCastle" />Project file
paket add OutWit.Communication.Server.Encryption.BouncyCastle --version 2.3.4
#r "nuget: OutWit.Communication.Server.Encryption.BouncyCastle, 2.3.4"
#:package OutWit.Communication.Server.Encryption.BouncyCastle@2.3.4
#addin nuget:?package=OutWit.Communication.Server.Encryption.BouncyCastle&version=2.3.4Install as a Cake Addin
#tool nuget:?package=OutWit.Communication.Server.Encryption.BouncyCastle&version=2.3.4Install as a Cake Tool
Cross-platform BouncyCastle-based encryption for WitRPC server, providing RSA/AES encryption compatible with BouncyCastle clients.
OutWit.Communication.Server.Encryption.BouncyCastle provides a cross-platform encryption implementation for WitRPC servers using the BouncyCastle cryptography library. This package is required when your clients use BouncyCastle encryption (e.g., Blazor WebAssembly clients).
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.Server.Encryption.BouncyCastle
Use the extension method for the simplest setup:
using OutWit.Communication.Server;
using OutWit.Communication.Server.Encryption.BouncyCastle;
var server = WitServerBuilder.Build(options =>
{
options.WithWebSocket("http://localhost:5000", maxClients: 100);
options.WithJson();
options.WithBouncyCastleEncryption(); // Simple extension method
options.WithService(myService);
});
server.StartWaitingForConnection();
services.AddSingleton<IEncryptorServerFactory, EncryptorServerBouncyCastleFactory>();
services.AddWitRpcServer("my-server", (options, sp) =>
{
var encryptorFactory = sp.GetRequiredService<IEncryptorServerFactory>();
options.WithTcp(5000, maxClients: 50);
options.WithJson();
options.WithEncryptor(encryptorFactory);
options.WithService<IMyService>(sp.GetRequiredService<IMyService>());
});
BouncyCastle encryption is NOT compatible with standard .NET encryption.
When using WithBouncyCastleEncryption() on the server, your clients must also use WithBouncyCastleEncryption():
// Client configuration (required!)
var client = WitClientBuilder.Build(options =>
{
options.WithWebSocket("ws://localhost:5000");
options.WithJson();
options.WithBouncyCastleEncryption(); // Must match server!
});
| Server Encryption | Client 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.Server.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.