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
algorithmAlgorithmIdentifierprivateKeyAsymmetricKeyParameter
Asn1SignatureFactory(AlgorithmIdentifier, AsymmetricKeyParameter, SecureRandom)
public Asn1SignatureFactory(AlgorithmIdentifier algorithm, AsymmetricKeyParameter privateKey, SecureRandom random)
Parameters
algorithmAlgorithmIdentifierprivateKeyAsymmetricKeyParameterrandomSecureRandom
Asn1SignatureFactory(string, AsymmetricKeyParameter)
Base constructor.
public Asn1SignatureFactory(string algorithm, AsymmetricKeyParameter privateKey)
Parameters
algorithmstringThe name of the signature algorithm to use.
privateKeyAsymmetricKeyParameterThe 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
algorithmstringThe name of the signature algorithm to use.
privateKeyAsymmetricKeyParameterThe private key to be used in the signing operation.
randomSecureRandomThe source of randomness to be used in signature calculation.
Properties
AlgorithmDetails
The algorithm details object for this calculator.
public object AlgorithmDetails { get; }
Property Value
SignatureAlgNames
Allows enumeration of the signature names supported by the verifier provider.
public static IEnumerable<string> SignatureAlgNames { get; }
Property Value
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.