====== 5. Integration ======
In diesem Kapitel erfahren Sie, wie Sie OpenSSL in Ihre .NET-Anwendungen integrieren.
----
===== Übersicht =====
| Thema | Beschreibung | Seite |
|-------|--------------|-------|
| P/Invoke | DLLs in .NET einbinden | [[.:dotnet-pinvoke]] |
| Blazor WASM | WASM in Browser nutzen | [[.:blazor-wasm]] |
| NuGet | Pakete erstellen und nutzen | [[.:nuget-grundlagen]] |
----
===== Schnellstart =====
==== 1. DLLs kopieren ====
# In Ihr .NET-Projektverzeichnis
copy "D:\Projects\openssl-3.6.0\bin\bin\libcrypto-3-x64.dll" .\
copy "D:\Projects\openssl-3.6.0\bin\bin\libssl-3-x64.dll" .\
==== 2. .csproj anpassen ====
PreserveNewest
PreserveNewest
==== 3. P/Invoke verwenden ====
using System.Runtime.InteropServices;
public static class OpenSsl
{
[DllImport("libcrypto-3-x64.dll")]
public static extern int OPENSSL_init_crypto(ulong opts, IntPtr settings);
}
----
===== Welche Integration passt zu Ihnen? =====
| Anwendungstyp | Empfehlung |
|---------------|------------|
| .NET Console/WinForms/WPF | [[.:dotnet-pinvoke|P/Invoke]] |
| ASP.NET Core API | [[.:dotnet-pinvoke|P/Invoke]] |
| Blazor WebAssembly | [[.:blazor-wasm|WASM Integration]] |
| Blazor Server | [[.:dotnet-pinvoke|P/Invoke]] |
| Library für andere | [[.:nuget-grundlagen|NuGet-Paket]] |
----
===== Weiter zu =====
* [[.:dotnet-pinvoke|P/Invoke - DLLs einbinden]]
* [[.:nuget-grundlagen|NuGet - Pakete erstellen]]
* [[.:verteilung:start|6. Verteilung]]
----
//Wolfgang van der Stille @ EMSR DATA d.o.o. - Post-Quantum Cryptography Professional//