<PackageReference Include="BouncyCastle.Cryptography" Version="2.8.0-beta.349" />

Org.BouncyCastle.Cms.SignerInfoGeneratorBuilder

Builds SignerInfoGenerator instances for CMS SignedData creation.

Initialises a builder with default signed-attribute generation.

public SignerInfoGenerator Build(ISignatureFactory contentSigner, X509Certificate certificate)

Builds a generator that identifies the signer by X.509 issuer and serial number from certificate.

public SignerInfoGenerator Build(ISignatureFactory signerFactory, byte[] subjectKeyIdentifier)

Builds a generator that identifies the signer by subject key identifier. The identifier should follow RFC 5280 section 4.2.1.2 where possible.

public SignerInfoGeneratorBuilder SetDirectSignature(bool hasNoSignedAttributes)

When hasNoSignedAttributes is true, the signature is computed over the content only and no signed or unsigned attributes are included.

Sets a custom generator for signed attributes.

Sets a generator for unsigned attributes.