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" />
<PackageVersion Include="PgpCore" Version="1.2.0" />
<PackageReference Include="PgpCore" />
paket add PgpCore --version 1.2.0
#r "nuget: PgpCore, 1.2.0"
#:package PgpCore@1.2.0
#addin nuget:?package=PgpCore&version=1.2.0
#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. net10.0 was computed. 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. |
| .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 (20)
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 |
|
|
PTRPlus.Framework
PTR Plus Framework |
|
|
Sonar.Lib.SFTP
Package Description |
GitHub repositories (5)
Showing the top 5 popular GitHub repositories that depend on PgpCore:
| Repository | Stars |
|---|---|
|
ClassIsland/ClassIsland
一款功能强、可定制、跨平台,适用于班级多媒体屏幕的课表信息显示工具,可以一目了然地显示各种信息。
|
|
|
paillave/Etl.Net
Mass processing data with a complete ETL for .net developers
|
|
|
axzxs2001/Asp.NetCoreExperiment
原来所有项目都移动到**OleVersion**目录下进行保留。新的案例装以.net 5.0为主,一部分对以前案例进行升级,一部分将以前的工作经验总结出来,以供大家参考!
|
|
|
automuteus/amonguscapture
Capture of the local Among Us executable state
|
|
|
UiPath/Community.Activities
Repository of Windows Workflow Foundation Activities for UiPath Community
|
| Version | Downloads | Last Updated |
|---|---|---|
| 7.2.0 | 2,860 | 7/6/2026 |
| 7.1.0 | 84,084 | 6/1/2026 |
| 7.0.0 | 329,851 | 2/24/2026 |
| 6.5.5 | 53,032 | 2/23/2026 |
| 6.5.4 | 204,912 | 1/13/2026 |
| 6.5.3 | 316,200 | 10/20/2025 |
| 6.5.2 | 963,837 | 6/2/2025 |
| 6.5.1 | 2,535,476 | 9/16/2024 |
| 6.5.0 | 617,613 | 6/13/2024 |
| 6.4.1 | 65,818 | 6/3/2024 |
| 6.3.1 | 1,446,383 | 12/19/2023 |
| 5.13.1 | 183,826 | 11/15/2023 |
| 5.13.0 | 256,562 | 10/21/2023 |
| 5.10.0 | 1,358,047 | 3/23/2023 |
| 5.9.0 | 866,613 | 11/16/2022 |
| 1.2.0 | 27,561 | 7/4/2018 |
Fixed signed files and added test app.