In diesem Kapitel erfahren Sie, wie Sie OpenSSL in Ihre .NET-Anwendungen integrieren.
| Thema | Beschreibung | Seite |
| ——- | ————– | ——- |
| P/Invoke | DLLs in .NET einbinden | 5.1 P/Invoke - DLLs einbinden |
| Blazor WASM | WASM in Browser nutzen | blazor-wasm |
| NuGet | Pakete erstellen und nutzen | 5.2 NuGet-Grundlagen |
# 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" .\
<ItemGroup> <None Update="libcrypto-3-x64.dll"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> <None Update="libssl-3-x64.dll"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> </ItemGroup>
using System.Runtime.InteropServices; public static class OpenSsl { [DllImport("libcrypto-3-x64.dll")] public static extern int OPENSSL_init_crypto(ulong opts, IntPtr settings); }
| Anwendungstyp | Empfehlung |
| ————— | ———— |
| .NET Console/WinForms/WPF | P/Invoke |
| ASP.NET Core API | P/Invoke |
| Blazor WebAssembly | WASM Integration |
| Blazor Server | P/Invoke |
| Library für andere | NuGet-Paket |
Wolfgang van der Stille @ EMSR DATA d.o.o. - Post-Quantum Cryptography Professional