PdfBox.Net.Cryptography 4.0.0-preview.5

This is a prerelease version of PdfBox.Net.Cryptography.
dotnet add package PdfBox.Net.Cryptography --version 4.0.0-preview.5
                    
NuGet\Install-Package PdfBox.Net.Cryptography -Version 4.0.0-preview.5
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PdfBox.Net.Cryptography" Version="4.0.0-preview.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PdfBox.Net.Cryptography" Version="4.0.0-preview.5" />
                    
Directory.Packages.props
<PackageReference Include="PdfBox.Net.Cryptography" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PdfBox.Net.Cryptography --version 4.0.0-preview.5
                    
#r "nuget: PdfBox.Net.Cryptography, 4.0.0-preview.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package PdfBox.Net.Cryptography@4.0.0-preview.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PdfBox.Net.Cryptography&version=4.0.0-preview.5&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=PdfBox.Net.Cryptography&version=4.0.0-preview.5&prerelease
                    
Install as a Cake Tool

PdfBox.Net.Cryptography

Optional cryptography backend for PdfBox.Net public-key PDF security.

This package depends on BouncyCastle.Cryptography and registers a provider for the core PublicKeySecurityHandler. The core PdfBox.Net assembly keeps the Java-shaped public-key API but does not reference BouncyCastle directly.

Currently covered:

  • PKCS#12 key-store loading for Java-compatible Loader.LoadPDF(..., keyStore, alias) overloads
  • PKCS#12 certificate loading fallback for platforms where native X509KeyStorageFlags.EphemeralKeySet loading is unavailable
  • CMS EnvelopedData recipient creation for PublicKeyProtectionPolicy
  • CMS EnvelopedData recipient decryption for public-key encrypted PDFs
  • OCSP request/response helpers that preserve raw OCSP response bytes for DSS/LTV embedding

Install:

dotnet add package PdfBox.Net.Cryptography

Usage:

using PdfBox.Net.Cryptography.PDModel.Encryption;

BouncyCastlePublicKeySecurityProvider.Register();

Call the registration method once at process startup before loading public-key encrypted PDFs or using APIs that create public-key protection policies.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.0-preview.5 32 7/15/2026
4.0.0-preview.4 36 7/15/2026
4.0.0-preview.3 39 7/14/2026
4.0.0-preview.2 62 7/7/2026
4.0.0-preview.1 54 7/2/2026
3.0.8-preview.1 46 7/2/2026

Tracks Apache PDFBox apache/pdfbox trunk (4.0.0-SNAPSHOT).