<PackageReference Include="BouncyCastle.Cryptography" Version="2.0.0" />

PgpSignatureSubpacketGenerator

Base constructor, creates an empty generator.

Constructor for pre-initialising the generator from an existing one.

public void SetEmbeddedSignature(bool isCritical, PgpSignature pgpSignature)

public void SetExportable(bool isCritical, bool isExportable)

public void SetFeature(bool isCritical, byte feature)

public void SetIssuerKeyID(bool isCritical, long keyID)

Sets issuer key sub packet

public void SetKeyExpirationTime(bool isCritical, long seconds)

Set the number of seconds a key is valid for after the time of its creation. A value of zero means the key never expires.

public void SetKeyFlags(bool isCritical, int flags)

public void SetNotationData(bool isCritical, bool isHumanReadable, string notationName, string notationValue)

public void SetPreferredCompressionAlgorithms(bool isCritical, int[] algorithms)

public void SetPreferredHashAlgorithms(bool isCritical, int[] algorithms)

public void SetPreferredSymmetricAlgorithms(bool isCritical, int[] algorithms)

public void SetPrimaryUserId(bool isCritical, bool isPrimaryUserId)

public void SetRevocable(bool isCritical, bool isRevocable)

public void SetRevocationKey(bool isCritical, PublicKeyAlgorithmTag keyAlgorithm, byte[] fingerprint)

Sets revocation key sub packet

public void SetRevocationReason(bool isCritical, RevocationReasonTag reason, string description)

Sets revocation reason sub packet

public void SetSignatureCreationTime(bool isCritical, DateTime date)

Set the creation time for the signature. Note: this overrides the generation of a creation time when the signature is generated.

public void SetSignatureExpirationTime(bool isCritical, long seconds)

Set the number of seconds a signature is valid for after the time of its creation. A value of zero means the signature never expires.

public void SetSignerUserId(bool isCritical, string userId)

public void SetSignerUserId(bool isCritical, byte[] rawUserId)

public void SetTrust(bool isCritical, int depth, int trustAmount)

Add a TrustSignature packet to the signature. The values for depth and trust are largely installation dependent but there are some guidelines in RFC 4880 - 5.2.3.13.