Kllmp.Org.Security 1.0.2

dotnet add package Kllmp.Org.Security --version 1.0.2
                    
NuGet\Install-Package Kllmp.Org.Security -Version 1.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Kllmp.Org.Security" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Kllmp.Org.Security" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="Kllmp.Org.Security" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Kllmp.Org.Security --version 1.0.2
                    
#r "nuget: Kllmp.Org.Security, 1.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Kllmp.Org.Security@1.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Kllmp.Org.Security&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=Kllmp.Org.Security&version=1.0.2
                    
Install as a Cake Tool

Kllmp.Org.Security

Este proyecto incluye dos clases principales para el manejo de cifrado y descifrado de datos utilizando algoritmos simétricos (AES) y asimétricos (RSA) en .NET

Clases

AESLibrary

Clase estática que proporciona métodos para cifrado y descifrado utilizando AES en dos modos:

  • AES-GCM

    • EncryptAESGCM(string valor, string accesoSimetrico, string codigoAutenticacionHash)
      Cifra datos usando AES en modo GCM, con autenticación adicional.
    • DecryptAESGCM(string valorCifrado, string accesoSimetrico, string codigoAutenticacionHash)
      Descifra datos cifrados en modo GCM, validando la autenticación.
  • AES-CBC + HMAC

    • EncryptAES_CBC(string plainText, string accesoSimetrico, string codigoAutenticacionHash)
      Cifra datos usando AES en modo CBC y añade autenticación HMAC-SHA256.
    • DecryptAES_CBC(string valorBase64, string accesoSimetrico, string codigoAutenticacionHash)
      Descifra datos cifrados en modo CBC, validando la autenticación HMAC.

Características:

  • Uso de claves y vectores de inicialización generados aleatoriamente.
  • Validación de integridad mediante HMAC (CBC) y autenticación adicional (GCM).
  • Manejo robusto de excepciones.

RSALibrary

Clase que proporciona métodos para cifrado y descifrado de datos utilizando RSA, soportando diferentes formatos y modos de padding:

  • RSA OAEP SHA256 (PEM):

    • EncriptOaepSHA256Padding(string text, string pem)
      Cifra datos usando la clave pública en formato PEM y padding OAEP SHA256.
    • DecriptOaepSHA256Padding(string cipher, string pem)
      Descifra datos usando la clave privada en formato PEM y padding OAEP SHA256.
  • RSA sin OAEP (XML):

    • EncriptWithoutOAEPPadding(string text, string xml)
      Cifra datos usando la clave pública en formato XML y padding PKCS#1 v1.5.
    • DecriptWithoutOAEPPadding(string text, string xml)
      Descifra datos usando la clave privada en formato XML y padding PKCS#1 v1.5.

Características:

  • Soporte para claves en formato PEM y XML.
  • Padding OAEP con SHA256 y sin OAEP (PKCS#1 v1.5).
  • Manejo robusto de excepciones.

Requisitos

  • .NET 8 o Superior
  • C# 12

Uso

Importar el namespace Kllmp.Org.Security y utilizar los métodos estáticos de las clases según el tipo de cifrado requerido.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Kllmp.Org.Security:

Package Downloads
Kllmp.Org.Soptec.Library

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.2 167 4/13/2026
1.0.1 328 11/10/2025
1.0.0 283 11/10/2025