Table of Contents

Class Asn1SignatureFactory

Namespace
Org.BouncyCastle.Crypto.Operators
Assembly
BouncyCastle.Cryptography.dll

Calculator factory class for signature generation in ASN.1 based profiles that use an AlgorithmIdentifier to preserve signature algorithm details.

public class Asn1SignatureFactory : ISignatureFactory
Inheritance
Asn1SignatureFactory
Implements
Inherited Members

Constructors

Asn1SignatureFactory(AlgorithmIdentifier, AsymmetricKeyParameter)

public Asn1SignatureFactory(AlgorithmIdentifier algorithm, AsymmetricKeyParameter privateKey)

Parameters

algorithm AlgorithmIdentifier
privateKey AsymmetricKeyParameter

Asn1SignatureFactory(AlgorithmIdentifier, AsymmetricKeyParameter, SecureRandom)

public Asn1SignatureFactory(AlgorithmIdentifier algorithm, AsymmetricKeyParameter privateKey, SecureRandom random)

Parameters

algorithm AlgorithmIdentifier
privateKey AsymmetricKeyParameter
random SecureRandom

Asn1SignatureFactory(string, AsymmetricKeyParameter)

Base constructor.

public Asn1SignatureFactory(string algorithm, AsymmetricKeyParameter privateKey)

Parameters

algorithm string

The name of the signature algorithm to use.

privateKey AsymmetricKeyParameter

The private key to be used in the signing operation.

Asn1SignatureFactory(string, AsymmetricKeyParameter, SecureRandom)

Constructor which also specifies a source of randomness to be used if one is required.

public Asn1SignatureFactory(string algorithm, AsymmetricKeyParameter privateKey, SecureRandom random)

Parameters

algorithm string

The name of the signature algorithm to use.

privateKey AsymmetricKeyParameter

The private key to be used in the signing operation.

random SecureRandom

The source of randomness to be used in signature calculation.

Properties

AlgorithmDetails

The algorithm details object for this calculator.

public object AlgorithmDetails { get; }

Property Value

object

SignatureAlgNames

Allows enumeration of the signature names supported by the verifier provider.

public static IEnumerable<string> SignatureAlgNames { get; }

Property Value

IEnumerable<string>

Methods

CreateCalculator()

Create a stream calculator for this signature calculator. The stream calculator is used for the actual operation of entering the data to be signed and producing the signature block.

public IStreamCalculator<IBlockResult> CreateCalculator()

Returns

IStreamCalculator<IBlockResult>

A calculator producing an IBlockResult with a signature in it.