Joy.Security 0.0.2

dotnet add package Joy.Security --version 0.0.2
                    
NuGet\Install-Package Joy.Security -Version 0.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="Joy.Security" Version="0.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Joy.Security" Version="0.0.2" />
                    
Directory.Packages.props
<PackageReference Include="Joy.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 Joy.Security --version 0.0.2
                    
#r "nuget: Joy.Security, 0.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 Joy.Security@0.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=Joy.Security&version=0.0.2
                    
Install as a Cake Addin
#tool nuget:?package=Joy.Security&version=0.0.2
                    
Install as a Cake Tool

GenerateKey()��GenerateIV()������������ǻ����ֽڵģ�ֱ�ӱ�����ַ�����һ���߱��ɶ��ԣ�ͨ����

�����㷨�������룺string → byte[]

  • UTF8
  • hex
  • base64

���ı����: string ↔ byte[]

  • UTF8(���)
  • GB2312
  • ...

���ı����: string ↔ byte[]

  • base64
  • hex

AES

using var cipher = Symmetric.Aes("215E34B7C00B2D3C5AAD433DB0339DFE3BF3CA64B48FA0DBB56443A6DC1060A1", "A432833714D886B659AED9FD75C3C00D", HexEncoding.HEX, SecurityEncoding.LowerHex);
var miwen = cipher.Encrypt("fiosreu34343jfd");
var mingwen = cipher.Decrypt("4e30bb5171360afc7596ee6804e7b9f1");

Hash

using var hash = Hash.MD5();
var hashed = hash.ComputeText("ABC");

using var hash = Hmac.SHA256("902fbdd2b1df0c4f70b4a5d23525e932");
var hmaced = hash.ComputeText("ABC");

DistributedLocks �ݵȲ���

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  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 is compatible.  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.
  • net10.0

    • No dependencies.
  • net6.0

    • No dependencies.
  • net8.0

    • No dependencies.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Joy.Security:

Package Downloads
Joy.HuaweiCloud

Package Description

Joy.Oss.Aliyun

Package Description

Joy.Json

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.2 41 5/23/2026
0.0.1 457 4/30/2024