C# Class Org.BouncyCastle.Bcpg.OpenPgp.PgpSignatureSubpacketGenerator

Generator for signature subpackets.
Show file Open project: nonorganic/dssnet Class Usage Examples

Public Methods

Method Description
Generate ( ) : PgpSignatureSubpacketVector
SetEmbeddedSignature ( bool isCritical, PgpSignature pgpSignature ) : void
SetExportable ( bool isCritical, bool isExportable ) : void
SetIssuerKeyID ( bool isCritical, long keyID ) : void

Sets issuer key sub packet

SetKeyExpirationTime ( bool isCritical, long seconds ) : void

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.

SetKeyFlags ( bool isCritical, int flags ) : void
SetNotationData ( bool isCritical, bool isHumanReadable, string notationName, string notationValue ) : void
SetPreferredCompressionAlgorithms ( bool isCritical, int algorithms ) : void
SetPreferredHashAlgorithms ( bool isCritical, int algorithms ) : void
SetPreferredSymmetricAlgorithms ( bool isCritical, int algorithms ) : void
SetPrimaryUserId ( bool isCritical, bool isPrimaryUserId ) : void
SetRevocable ( bool isCritical, bool isRevocable ) : void
SetRevocationKey ( bool isCritical, PublicKeyAlgorithmTag keyAlgorithm, byte fingerprint ) : void

Sets revocation key sub packet

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

Sets revocation reason sub packet

SetSignatureCreationTime ( bool isCritical, DateTime date ) : void

Set the creation time for the signature.

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

SetSignatureExpirationTime ( bool isCritical, long seconds ) : void

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.

SetSignerUserId ( bool isCritical, string userId ) : void
SetTrust ( bool isCritical, int depth, int trustAmount ) : void

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.

Method Details

Generate() public method

public Generate ( ) : PgpSignatureSubpacketVector
return PgpSignatureSubpacketVector

SetEmbeddedSignature() public method

public SetEmbeddedSignature ( bool isCritical, PgpSignature pgpSignature ) : void
isCritical bool
pgpSignature PgpSignature
return void

SetExportable() public method

public SetExportable ( bool isCritical, bool isExportable ) : void
isCritical bool
isExportable bool
return void

SetIssuerKeyID() public method

Sets issuer key sub packet
public SetIssuerKeyID ( bool isCritical, long keyID ) : void
isCritical bool
keyID long
return void

SetKeyExpirationTime() public method

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 SetKeyExpirationTime ( bool isCritical, long seconds ) : void
isCritical bool True, if should be treated as critical, false otherwise.
seconds long The number of seconds the key is valid, or zero if no expiry.
return void

SetKeyFlags() public method

public SetKeyFlags ( bool isCritical, int flags ) : void
isCritical bool
flags int
return void

SetNotationData() public method

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

SetPreferredCompressionAlgorithms() public method

public SetPreferredCompressionAlgorithms ( bool isCritical, int algorithms ) : void
isCritical bool
algorithms int
return void

SetPreferredHashAlgorithms() public method

public SetPreferredHashAlgorithms ( bool isCritical, int algorithms ) : void
isCritical bool
algorithms int
return void

SetPreferredSymmetricAlgorithms() public method

public SetPreferredSymmetricAlgorithms ( bool isCritical, int algorithms ) : void
isCritical bool
algorithms int
return void

SetPrimaryUserId() public method

public SetPrimaryUserId ( bool isCritical, bool isPrimaryUserId ) : void
isCritical bool
isPrimaryUserId bool
return void

SetRevocable() public method

public SetRevocable ( bool isCritical, bool isRevocable ) : void
isCritical bool
isRevocable bool
return void

SetRevocationKey() public method

Sets revocation key sub packet
public SetRevocationKey ( bool isCritical, PublicKeyAlgorithmTag keyAlgorithm, byte fingerprint ) : void
isCritical bool
keyAlgorithm PublicKeyAlgorithmTag
fingerprint byte
return void

SetRevocationReason() public method

Sets revocation reason sub packet
public SetRevocationReason ( bool isCritical, RevocationReasonTag reason, string description ) : void
isCritical bool
reason RevocationReasonTag
description string
return void

SetSignatureCreationTime() public method

Set the creation time for the signature.

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

public SetSignatureCreationTime ( bool isCritical, DateTime date ) : void
isCritical bool
date DateTime
return void

SetSignatureExpirationTime() public method

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 SetSignatureExpirationTime ( bool isCritical, long seconds ) : void
isCritical bool True, if should be treated as critical, false otherwise.
seconds long The number of seconds the signature is valid, or zero if no expiry.
return void

SetSignerUserId() public method

public SetSignerUserId ( bool isCritical, string userId ) : void
isCritical bool
userId string
return void

SetTrust() public method

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.
public SetTrust ( bool isCritical, int depth, int trustAmount ) : void
isCritical bool true if the packet is critical.
depth int depth level.
trustAmount int trust amount.
return void