PgpCore 1.2.0
See the version list below for details.
dotnet add package PgpCore --version 1.2.0
NuGet\Install-Package PgpCore -Version 1.2.0
<PackageReference Include="PgpCore" Version="1.2.0" />
paket add PgpCore --version 1.2.0
#r "nuget: PgpCore, 1.2.0"
// Install PgpCore as a Cake Addin #addin nuget:?package=PgpCore&version=1.2.0 // Install PgpCore as a Cake Tool #tool nuget:?package=PgpCore&version=1.2.0
PgpCore
A .NET Core class library for using PGP.
This is based on <a href="https://github.com/Cinchoo/ChoPGP" alt="ChoPGP">ChoPGP</a> but updated to .NET Core framework and to add in a missing utilities class.
Installation
To use PgpCore in your C# project, you can either download the PgpCore C# .NET libraries directly from the Github repository or, if you have the NuGet package manager installed, you can grab them automatically.
PM> Install-Package PgpCore
Once you have the PgpCore libraries properly referenced in your project, you can include calls to them in your code.
Add the following namespaces to use the library:
using PgpCore;
Dependencies
BouncyCastle.NetCore (>= 1.8.1.3)
Microsoft.NETCore.App (>= 1.1.2)
Usage
This is intended for usage in .NET Core projects.
using (PGP pgp = new PGP())
{
// Generate keys
pgp.GenerateKey(@"C:\TEMP\keys\public.asc", @"C:\TEMP\keys\private.asc", "email@email.com", "password");
// Encrypt file
pgp.EncryptFile(@"C:\TEMP\keys\content.txt", @"C:\TEMP\keys\content__encrypted.pgp", @"C:\TEMP\keys\public.asc", true, true);
// Decrypt file
pgp.DecryptFile(@"C:\TEMP\keys\content__encrypted.pgp", @"C:\TEMP\keys\content__decrypted.txt", @"C:\TEMP\keys\private.asc", "password");
// Encrypt stream
using (FileStream inputFileStream = new FileStream(@"C:\TEMP\keys\content.txt", FileMode.Open))
using (Stream outputFileStream = File.Create(@"C:\TEMP\keys\content__encrypted2.pgp"))
using (Stream publicKeyStream = new FileStream(@"C:\TEMP\keys\public.asc", FileMode.Open))
pgp.EncryptStream(inputFileStream, outputFileStream, publicKeyStream, true, true);
// Decrypt stream
using (FileStream inputFileStream = new FileStream(@"C:\TEMP\keys\content__encrypted2.pgp", FileMode.Open))
using (Stream outputFileStream = File.Create(@"C:\TEMP\keys\content__decrypted2.txt"))
using (Stream privateKeyStream = new FileStream(@"C:\TEMP\keys\private.asc", FileMode.Open))
pgp.DecryptStream(inputFileStream, outputFileStream, privateKeyStream, "password");
}
A good resource for generating keys and messages is <a href="https://wp2pgpmail.com/pgp-key-generator/" alt="PGP Key Generator">PGP Key Generator</a>.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 was computed. 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. |
.NET Core | netcoreapp1.0 was computed. netcoreapp1.1 was computed. netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard1.3 is compatible. netstandard1.4 was computed. netstandard1.5 was computed. netstandard1.6 was computed. netstandard2.0 was computed. netstandard2.1 was computed. |
.NET Framework | net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen30 was computed. tizen40 was computed. tizen60 was computed. |
Universal Windows Platform | uap was computed. uap10.0 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 1.3
- BouncyCastle.NetCore (>= 1.8.2)
- NETStandard.Library (>= 1.6.1)
NuGet packages (12)
Showing the top 5 NuGet packages that depend on PgpCore:
Package | Downloads |
---|---|
DTF.Services.Common.V2
DTF common services. |
|
APF.Core
Package Description |
|
PasswordManagerAccess
Package Description |
|
Hona.Tool
消息队列,如:kafka等 |
|
Sonar.Lib.SFTP
Package Description |
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on PgpCore:
Repository | Stars |
---|---|
axzxs2001/Asp.NetCoreExperiment
原来所有项目都移动到**OleVersion**目录下进行保留。新的案例装以.net 5.0为主,一部分对以前案例进行升级,一部分将以前的工作经验总结出来,以供大家参考!
|
|
automuteus/amonguscapture
Capture of the local Among Us executable state
|
Version | Downloads | Last updated |
---|---|---|
6.5.1 | 277,095 | 9/16/2024 |
6.5.0 | 258,217 | 6/13/2024 |
6.4.1 | 22,154 | 6/3/2024 |
6.3.1 | 595,140 | 12/19/2023 |
5.13.1 | 104,950 | 11/15/2023 |
5.13.0 | 129,673 | 10/21/2023 |
5.10.0 | 741,090 | 3/23/2023 |
5.9.0 | 591,050 | 11/16/2022 |
5.8.1 | 434,111 | 9/6/2022 |
5.7.0 | 354,956 | 7/11/2022 |
5.6.0 | 100,086 | 6/8/2022 |
5.5.0 | 811,535 | 11/19/2021 |
5.4.0 | 28,535 | 11/14/2021 |
5.3.2 | 34,920 | 11/5/2021 |
5.3.1 | 235,018 | 9/14/2021 |
5.3.0 | 37,678 | 8/27/2021 |
5.2.0 | 788,984 | 4/16/2021 |
5.1.0 | 102,227 | 2/2/2021 |
4.0.1 | 170,775 | 12/14/2020 |
4.0.0 | 42,193 | 12/1/2020 |
3.2.0 | 296,124 | 10/28/2020 |
3.1.0 | 37,477 | 10/16/2020 |
2.4.2 | 240,877 | 7/30/2020 |
2.4.1 | 18,354 | 6/29/2020 |
2.4.0 | 19,145 | 5/13/2020 |
2.3.0 | 32,465 | 3/30/2020 |
2.2.0 | 445,185 | 1/15/2020 |
2.1.1 | 35,178 | 11/20/2019 |
2.1.0 | 103,908 | 9/18/2019 |
2.0.0 | 91,072 | 8/28/2019 |
1.7.2 | 108,900 | 8/20/2019 |
1.7.0 | 115,809 | 7/24/2019 |
1.6.0 | 8,834 | 7/4/2019 |
1.4.1 | 206,156 | 3/29/2019 |
1.4.0 | 64,841 | 2/20/2019 |
1.3.1 | 35,827 | 12/6/2018 |
1.3.0 | 1,154 | 12/3/2018 |
1.2.1 | 41,143 | 8/20/2018 |
1.2.0 | 19,599 | 7/4/2018 |
1.1.1 | 6,770 | 2/10/2018 |
1.1.0 | 108,531 | 9/15/2017 |
1.0.3 | 1,307 | 8/3/2017 |
1.0.2 | 1,344 | 6/8/2017 |
1.0.1 | 1,325 | 6/5/2017 |
1.0.0 | 3,010 | 6/2/2017 |
Fixed signed files and added test app.