Class StandardDsaEncoding
- Namespace
- Org.BouncyCastle.Crypto.Signers
- Assembly
- BouncyCastle.Cryptography.dll
public class StandardDsaEncoding : IDsaEncoding
- Inheritance
-
StandardDsaEncoding
- Implements
- Inherited Members
Fields
Instance
public static readonly StandardDsaEncoding Instance
Field Value
Methods
CheckValue(BigInteger, BigInteger)
protected virtual BigInteger CheckValue(BigInteger n, BigInteger x)
Parameters
nBigIntegerxBigInteger
Returns
Decode(BigInteger, byte[])
Decode the (r, s) pair of a DSA signature.
public virtual BigInteger[] Decode(BigInteger n, byte[] encoding)
Parameters
nBigIntegerThe order of the group that r, s belong to.
encodingbyte[]An encoding of the (r, s) pair of a DSA signature.
Returns
- BigInteger[]
The (r, s) of a DSA signature, stored in an array of exactly two elements, r followed by s.
DecodeValue(BigInteger, Asn1Sequence, int)
protected virtual BigInteger DecodeValue(BigInteger n, Asn1Sequence s, int pos)
Parameters
nBigIntegersAsn1Sequenceposint
Returns
Encode(BigInteger, BigInteger, BigInteger)
Encode the (r, s) pair of a DSA signature.
public virtual byte[] Encode(BigInteger n, BigInteger r, BigInteger s)
Parameters
nBigIntegerThe order of the group that r, s belong to.
rBigIntegerThe r value of a DSA signature.
sBigIntegerThe s value of a DSA signature.
Returns
- byte[]
An encoding of the DSA signature given by the provided (r, s) pair.
Encode(BigInteger, BigInteger, BigInteger, Span<byte>)
public virtual int Encode(BigInteger n, BigInteger r, BigInteger s, Span<byte> output)
Parameters
nBigIntegerrBigIntegersBigIntegeroutputSpan<byte>
Returns
EncodeValue(BigInteger, BigInteger)
protected virtual DerInteger EncodeValue(BigInteger n, BigInteger x)
Parameters
nBigIntegerxBigInteger
Returns
GetMaxEncodingSize(BigInteger)
public virtual int GetMaxEncodingSize(BigInteger n)