====== 5. Integrazione ======
In questo capitolo imparerete come integrare OpenSSL nelle vostre applicazioni .NET.
----
===== Panoramica =====
| Argomento | Descrizione | Pagina |
|-----------|-------------|--------|
| P/Invoke | Incorporare DLL in .NET | [[.:dotnet-pinvoke]] |
| Blazor WASM | Usare WASM nel browser | [[.:blazor-wasm]] |
| NuGet | Creare e usare pacchetti | [[.:nuget-grundlagen]] |
----
===== Avvio Rapido =====
==== 1. Copiare le DLL ====
# Nella directory del progetto .NET
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. Modificare .csproj ====
PreserveNewest
PreserveNewest
==== 3. Usare P/Invoke ====
using System.Runtime.InteropServices;
public static class OpenSsl
{
[DllImport("libcrypto-3-x64.dll")]
public static extern int OPENSSL_init_crypto(ulong opts, IntPtr settings);
}
----
===== Quale Integrazione Fa per Voi? =====
| Tipo di Applicazione | Consigliato |
|----------------------|-------------|
| .NET Console/WinForms/WPF | [[.:dotnet-pinvoke|P/Invoke]] |
| ASP.NET Core API | [[.:dotnet-pinvoke|P/Invoke]] |
| Blazor WebAssembly | [[.:blazor-wasm|Integrazione WASM]] |
| Blazor Server | [[.:dotnet-pinvoke|P/Invoke]] |
| Libreria per altri | [[.:nuget-grundlagen|Pacchetto NuGet]] |
----
===== Continua con =====
* [[.:dotnet-pinvoke|P/Invoke - Incorporare DLL]]
* [[.:nuget-grundlagen|NuGet - Creare Pacchetti]]
* [[.:verteilung:start|6. Distribuzione]]
----
//Wolfgang van der Stille @ EMSR DATA d.o.o. - Post-Quantum Cryptography Professional//