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

Generator for PGP signatures.
Mostra file Open project: nonorganic/dssnet Class Usage Examples

Public Methods

Method Description
Generate ( ) : PgpSignature

Return a signature object containing the current signature state.

GenerateCertification ( PgpPublicKey pubKey ) : PgpSignature

Generate a certification, such as a revocation, for the passed in key.

GenerateCertification ( PgpPublicKey masterKey, PgpPublicKey pubKey ) : PgpSignature

Generate a certification for the passed in key against the passed in master key.

GenerateCertification ( PgpUserAttributeSubpacketVector userAttributes, PgpPublicKey pubKey ) : PgpSignature

Generate a certification for the passed in userAttributes.

GenerateCertification ( string id, PgpPublicKey pubKey ) : PgpSignature

Generate a certification for the passed in ID and key.

GenerateOnePassVersion ( bool isNested ) : PgpOnePassSignature

Return the one pass header associated with the current signature.

InitSign ( int sigType, PgpPrivateKey key ) : void

Initialise the generator for signing.

InitSign ( int sigType, PgpPrivateKey key, SecureRandom random ) : void

Initialise the generator for signing.

PgpSignatureGenerator ( PublicKeyAlgorithmTag keyAlgorithm, HashAlgorithmTag hashAlgorithm ) : System

Create a generator for the passed in keyAlgorithm and hashAlgorithm codes.

SetHashedSubpackets ( PgpSignatureSubpacketVector hashedPackets ) : void
SetUnhashedSubpackets ( PgpSignatureSubpacketVector unhashedPackets ) : void
Update ( ) : void
Update ( byte b ) : void
Update ( byte b, int off, int len ) : void

Private Methods

Method Description
GetEncodedPublicKey ( PgpPublicKey pubKey ) : byte[]
UpdateWithIdData ( int header, byte idBytes ) : void
UpdateWithPublicKey ( PgpPublicKey key ) : void
doCanonicalUpdateByte ( byte b ) : void
doUpdateByte ( byte b ) : void
doUpdateCRLF ( ) : void
insertSubpacket ( SignatureSubpacket packets, SignatureSubpacket subpacket ) : SignatureSubpacket[]
packetPresent ( SignatureSubpacket packets, SignatureSubpacketTag type ) : bool

Method Details

Generate() public method

Return a signature object containing the current signature state.
public Generate ( ) : PgpSignature
return PgpSignature

GenerateCertification() public method

Generate a certification, such as a revocation, for the passed in key.
public GenerateCertification ( PgpPublicKey pubKey ) : PgpSignature
pubKey PgpPublicKey The key we are certifying.
return PgpSignature

GenerateCertification() public method

Generate a certification for the passed in key against the passed in master key.
public GenerateCertification ( PgpPublicKey masterKey, PgpPublicKey pubKey ) : PgpSignature
masterKey PgpPublicKey The key we are certifying against.
pubKey PgpPublicKey The key we are certifying.
return PgpSignature

GenerateCertification() public method

Generate a certification for the passed in userAttributes.
public GenerateCertification ( PgpUserAttributeSubpacketVector userAttributes, PgpPublicKey pubKey ) : PgpSignature
userAttributes PgpUserAttributeSubpacketVector The ID we are certifying against the public key.
pubKey PgpPublicKey The key we are certifying against the ID.
return PgpSignature

GenerateCertification() public method

Generate a certification for the passed in ID and key.
public GenerateCertification ( string id, PgpPublicKey pubKey ) : PgpSignature
id string The ID we are certifying against the public key.
pubKey PgpPublicKey The key we are certifying against the ID.
return PgpSignature

GenerateOnePassVersion() public method

Return the one pass header associated with the current signature.
public GenerateOnePassVersion ( bool isNested ) : PgpOnePassSignature
isNested bool
return PgpOnePassSignature

InitSign() public method

Initialise the generator for signing.
public InitSign ( int sigType, PgpPrivateKey key ) : void
sigType int
key PgpPrivateKey
return void

InitSign() public method

Initialise the generator for signing.
public InitSign ( int sigType, PgpPrivateKey key, SecureRandom random ) : void
sigType int
key PgpPrivateKey
random Org.BouncyCastle.Security.SecureRandom
return void

PgpSignatureGenerator() public method

Create a generator for the passed in keyAlgorithm and hashAlgorithm codes.
public PgpSignatureGenerator ( PublicKeyAlgorithmTag keyAlgorithm, HashAlgorithmTag hashAlgorithm ) : System
keyAlgorithm PublicKeyAlgorithmTag
hashAlgorithm HashAlgorithmTag
return System

SetHashedSubpackets() public method

public SetHashedSubpackets ( PgpSignatureSubpacketVector hashedPackets ) : void
hashedPackets PgpSignatureSubpacketVector
return void

SetUnhashedSubpackets() public method

public SetUnhashedSubpackets ( PgpSignatureSubpacketVector unhashedPackets ) : void
unhashedPackets PgpSignatureSubpacketVector
return void

Update() public method

public Update ( ) : void
return void

Update() public method

public Update ( byte b ) : void
b byte
return void

Update() public method

public Update ( byte b, int off, int len ) : void
b byte
off int
len int
return void