https://github.com/itbackyard/CryptoNet
CryptoNet is simple, fast and a lightweight asymmetric and symmetric encryption library.
https://github.com/itbackyard/CryptoNet
aes asymmetric-encryption cryptography csharp decryption encryption rsa rsa-cryptography security symmetric-encryption x509
Last synced: about 2 months ago
JSON representation
CryptoNet is simple, fast and a lightweight asymmetric and symmetric encryption library.
- Host: GitHub
- URL: https://github.com/itbackyard/CryptoNet
- Owner: maythamfahmi
- License: mit
- Created: 2021-12-10T19:38:00.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-18T23:17:55.000Z (7 months ago)
- Last Synced: 2024-10-19T11:46:07.228Z (7 months ago)
- Topics: aes, asymmetric-encryption, cryptography, csharp, decryption, encryption, rsa, rsa-cryptography, security, symmetric-encryption, x509
- Language: C#
- Homepage: https://github.com/maythamfahmi/CryptoNet
- Size: 9.76 MB
- Stars: 98
- Watchers: 6
- Forks: 20
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-csharp - CryptoNet - .NET simple crypto library. Native c#. (Cryptography)
- awsome-dotnet - CryptoNet - .NET simple crypto library. Native c#. (Cryptography)
- awesome-dotnet - CryptoNet - .NET simple crypto library. Native c#. (Cryptography)
README

[](https://github.com/itbackyard/CryptoNet/blob/main/LICENSE)
[](https://www.nuget.org/packages/CryptoNet/)
[](https://github.com/itbackyard/CryptoNet/actions/workflows/ci.yml)
[](https://github.com/itbackyard/CryptoNet)

[](https://ci.appveyor.com/project/maythamfahmi/cryptonet/branch/main)# Introduction
:rocket: 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](https://docs.microsoft.com/en-us/dotnet/api/system.security.cryptography?view=net-8.0) cryptography.
It does not depend on other libraries.## Installation
You can install the CryptoNet NuGet package via [NuGet](https://www.nuget.org/packages/CryptoNet).
## Website
https://itbackyard.github.io/CryptoNet
## Versions
[](https://www.nuget.org/packages/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 signaturesCryptoNet 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.## Issues
Please report issues [here](https://github.com/itbackyard/CryptoNet/issues).
## How to use
Ref to docs.## Build and Testing
You have different options to build and run the unit tests from:
1. Visual Studio 2019/2022.
2. Visual Studio Code.
3. dotnet command line.
4. dotnet commands are preserved in a PowerShell script ```build.ps1```.
5. Docker, run the following command from the solution folder:```
docker build . --file .\Dockerfile --tag cryptonet-service:latest
```or run preserved PowerShell:
```powershell
./run_docker_build.ps1
```## How to release a new version?
Preview
```
.\run_release.ps1 -VersionNumber 3.0.0 -IsPreview $true
```Release
```
.\run_release.ps1 -VersionNumber 3.0.0 -IsPreview $false
```## Documentation Creation
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**.### Running Documentation Creation Locally
To generate the documentation locally on your computer, run:
```powershell
.\run_docs.ps1
```### Setup
1. Install the DocFX tool (only needs to be done once):
```
dotnet tool install -g docfx
```2. 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
```## Update `index.md` with `README.md`
To update `index.md` with the latest content from `README.md`, run the following command:
```powershell
./run_update_index.ps1
```
This script will:1. Add the following header to the top of `index.md`:
```yaml
---
_layout: landing
---
```2. Append the content of `README.md` to `index.md`.
This ensures that index.md is always up to date with the latest changes in `README.md`.
## Code Coverage
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.
### Running Code Coverage Locally
To generate code coverage reports locally on your computer, run the following command in Windows:
```powershell
.\run_codecoverage.ps1
```### Setup
If the required tools and packages are not set up locally, follow the steps below to configure them:
1. Navigate to your test project directory (e.g., `CryptoNet.UnitTests`):
```bash
cd .\CryptoNet.UnitTests\
```2. Add the necessary coverage packages to your test project:
```bash
dotnet add package coverlet.collector
dotnet add package coverlet.msbuild
```3. Install the report generator tool (only needs to be done once):
```bash
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.
## Contributing
You are more than welcome to contribute in one of the following ways:
1. Basic: Give input, and suggestions for improvement by creating an issue and labeling it https://github.com/itbackyard/CryptoNet/issues
2. 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.
3. Documentation: Add, update, or improve documentation, by making a pull request.### How to contribute:
[Here](https://www.dataschool.io/how-to-contribute-on-github/) is a link to learn how to contribute if you are not aware of how to do it.