🚀 CryptoNet is simple, fast, and a lightweight asymmetric and symmetric encryption NuGet library supporting .NET Standard 2.0 and C# 8.0 for cross platforms Windows, Linux, and iOS. It is a 100% native C# implementation based on Microsoft cryptography. It does not depend on other libraries.
You can install the CryptoNet NuGet package via NuGet.
https://itbackyard.github.io/CryptoNet
is latest version and are maintained.
CryptoNet v3:
- RSA: Asymmetric cryptographic algorithm used for secure data transmission and digital signatures.
- AES: Symmetric cryptographic algorithm used for fast and secure data encryption.
- DSA: Asymmetric cryptographic algorithm used for digital signatures
CryptoNet Extensions v3:
- RSA PEM exporting and importing.
- Support for X509Certificate2.
- Ability to encrypt and decrypt text, and files like images, word, excel, and any byte content.
- Cross-platform compatible with Windows, Linux, and iOS.
Please report issues here.
Ref to docs.
You have different options to build and run the unit tests from:
- Visual Studio 2019/2022.
- Visual Studio Code.
- dotnet command line.
- dotnet commands are preserved in a PowerShell script
build.ps1
. - Docker, run the following command from the solution folder:
docker build . --file .\Dockerfile --tag cryptonet-service:latest
or run preserved PowerShell:
./run_docker_build.ps1
Preview
.\run_release.ps1 -VersionNumber 3.0.0 -IsPreview $true
Release
.\run_release.ps1 -VersionNumber 3.0.0 -IsPreview $false
There are static and dynamically generated documentation. Both are published automatically in the pipeline called 5-static.yml
.
To work with the documentation locally, the following might be relevant:
- Static base documentation is located in the
docs
folder. - Dynamically generated documentation is created from code using a tool called DocFX.
To generate the documentation locally on your computer, run:
.\run_docs.ps1
- Install the DocFX tool (only needs to be done once):
dotnet tool install -g docfx
- The following step is already configured in this repository. However, if you need to start over, run the following to initialize and configure DocFX:
docfx init -y
To update index.md
with the latest content from README.md
, run the following command:
./run_update_index.ps1
This script will:
- Add the following header to the top of
index.md
:
---
_layout: landing
---
- Append the content of
README.md
toindex.md
.
This ensures that index.md is always up to date with the latest changes in README.md
.
Code coverage ensures that your tests adequately cover your codebase, improving overall quality, reliability, and maintainability. Follow these steps to set up and generate code coverage reports.
To generate code coverage reports locally on your computer, run the following command in Windows:
.\run_codecoverage.ps1
If the required tools and packages are not set up locally, follow the steps below to configure them:
- Navigate to your test project directory (e.g.,
CryptoNet.UnitTests
):
cd .\CryptoNet.UnitTests\
- Add the necessary coverage packages to your test project:
dotnet add package coverlet.collector
dotnet add package coverlet.msbuild
- Install the report generator tool (only needs to be done once):
dotnet tool install --global dotnet-reportgenerator-globaltool
Once set up, you can use these tools to analyze and generate detailed code coverage reports to ensure thorough testing of your application.
You are more than welcome to contribute in one of the following ways:
- Basic: Give input, and suggestions for improvement by creating an issue and labeling it https://github.com/itbackyard/CryptoNet/issues
- Advance: if you have good knowledge of C# and Cryptography just grab one of the issues, or features, or create a new one and refactor and add a pull request.
- Documentation: Add, update, or improve documentation, by making a pull request.
Here is a link to learn how to contribute if you are not aware of how to do it.