nanoFramework.System.Security.Cryptography
1.0.3
Prefix Reserved
See the version list below for details.
dotnet add package nanoFramework.System.Security.Cryptography --version 1.0.3
NuGet\Install-Package nanoFramework.System.Security.Cryptography -Version 1.0.3
<PackageReference Include="nanoFramework.System.Security.Cryptography" Version="1.0.3" />
paket add nanoFramework.System.Security.Cryptography --version 1.0.3
#r "nuget: nanoFramework.System.Security.Cryptography, 1.0.3"
// Install nanoFramework.System.Security.Cryptography as a Cake Addin #addin nuget:?package=nanoFramework.System.Security.Cryptography&version=1.0.3 // Install nanoFramework.System.Security.Cryptography as a Cake Tool #tool nuget:?package=nanoFramework.System.Security.Cryptography&version=1.0.3
Welcome to the .NET nanoFramework System.Security.Cryptography Library repository
This repository contains the nanoFramework System.Security.Cryptography class library.
Build status
Component | Build Status | NuGet Package |
---|---|---|
System.Security.Cryptography |
System.Security.Cryptography usage
This library brings to .NET nanoFramework C# applications the equivalent implementations provided by Mbed TLS. The target there the code is going to be deployed has to have a firmware image built with this namespace enabled.
HMAC SHA256
This class computes a Hash-based Message Authentication Code (HMAC) by using the SHA256 hash function.
A typical usage for this, in IoT context, is to compute an hashed signature to connect to Azure IoT Hub. Like
Providing one has the _S_hared _A_ccess _K_ey and wants to encode a certain Uri the code snippet that does this is as simple has this:
var hmacsha256 = new HMACSHA256(Convert.FromBase64String(sharedAccessKey));
byte[] hash = hmacsha256.ComputeHash(Encoding.UTF8.GetBytes(encodedUri + "\n" + expiry));
string sig = Convert.ToBase64String(hash);
Feedback and documentation
For documentation, providing feedback, issues and finding out how to contribute please refer to the Home repo.
Join our Discord community here.
Credits
The list of contributors to this project can be found at CONTRIBUTORS.
License
The nanoFramework Class Libraries are licensed under the MIT license.
Code of Conduct
This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behaviour in our community. For more information see the .NET Foundation Code of Conduct.
.NET Foundation
This project is supported by the .NET Foundation.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net is compatible. |
-
- nanoFramework.CoreLibrary (>= 1.15.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.