SimpleSign.CAdES
0.11.1
dotnet add package SimpleSign.CAdES --version 0.11.1
NuGet\Install-Package SimpleSign.CAdES -Version 0.11.1
<PackageReference Include="SimpleSign.CAdES" Version="0.11.1" />
<PackageVersion Include="SimpleSign.CAdES" Version="0.11.1" />
<PackageReference Include="SimpleSign.CAdES" />
paket add SimpleSign.CAdES --version 0.11.1
#r "nuget: SimpleSign.CAdES, 0.11.1"
#:package SimpleSign.CAdES@0.11.1
#addin nuget:?package=SimpleSign.CAdES&version=0.11.1
#tool nuget:?package=SimpleSign.CAdES&version=0.11.1
SimpleSign.CAdES
Create and validate CAdES digital signatures (ETSI EN 319 122) — CMS/PKCS#7
baseline levels B-B, B-T, B-LT, and B-LTA, detached or enveloped (.p7m).
No BouncyCastle — only System.Security.Cryptography.
Quickstart
using SimpleSign.CAdES;
using SimpleSign.Core.Signing;
using SimpleSign.Core.Validation;
byte[] cms = await CadesSigner.Document(File.ReadAllBytes("contract.pdf"))
.WithCertificate(certificate)
.WithContentType(CadesContentType.Enveloped) // or Detached (default)
.WithLevel(AdesBaselineProfile.Timestamped(timestampOptions))
.SignAsync();
File.WriteAllBytes("contract.p7m", cms);
// ValidateAsync also checks the revocation of the signer and TSA chains
CadesValidationResult result = await new CadesSignatureValidator(
new ValidationOptions { TrustedRoots = [certificate] })
.ValidateAsync(cms, File.ReadAllBytes("contract.pdf"));
Console.WriteLine($"{result.Indication} {result.SubIndication}");
Signing runs SigningPolicy.Default (chain validity, key usage, RSA ≥ 2048, SHA-2/SHA-3);
.WithSigningPolicy(SigningPolicy.Load("signing-policy.json")) with NotRevoked at FAIL also checks the revocation of the chain.
When the key is on another machine, sign in two phases: CadesDeferredSigner.Document(data)…PrepareAsync() returns
the bytes to sign and a session; CadesDeferredSigner.Resume(session, key).CompleteAsync(signature) finishes the signature.
More at github.com/eupassarin/SimpleSign and the docs. MIT licensed.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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 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. |
-
net10.0
- SimpleSign.Core (>= 0.11.1)
-
net8.0
- SimpleSign.Core (>= 0.11.1)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on SimpleSign.CAdES:
| Package | Downloads |
|---|---|
|
SimpleSign
Meta-package for the SimpleSign signature formats: PAdES (PDF), CAdES and XAdES signing and validation, on SimpleSign.Core. |
|
|
SimpleSign.Brazil.IcpBrasil
ICP-Brasil for SimpleSign: bundled AC Raiz and intermediates, chain validation (DOC-ICP-04), signature policies AD-RB to AD-RA (DOC-ICP-15), standalone ACT timestamps and the Lei 14.063 level of each signature. |
|
|
SimpleSign.Brazil
Shared building blocks of the SimpleSign Brazilian trust frameworks: CPF/CNPJ, Lei 14.063/2020 levels, the advanced-signature (AEA) manifest and the ITI VALIDAR helpers. Used by SimpleSign.Brazil.IcpBrasil and SimpleSign.Brazil.GovBr. |
GitHub repositories
This package is not used by any popular GitHub repositories.