Class PlainDsaEncoding
- Namespace
- Org.BouncyCastle.Crypto.Signers
- Assembly
- BouncyCastle.Cryptography.dll
public class PlainDsaEncoding : IDsaEncoding
- Inheritance
-
PlainDsaEncoding
- Implements
- Inherited Members
Fields
Instance
public static readonly PlainDsaEncoding 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, byte[], int, int)
protected virtual BigInteger DecodeValue(BigInteger n, byte[] buf, int off, int len)
Parameters
nBigIntegerbufbyte[]offintlenint
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, byte[], int, int)
protected virtual void EncodeValue(BigInteger n, BigInteger x, byte[] buf, int off, int len)
Parameters
nBigIntegerxBigIntegerbufbyte[]offintlenint
EncodeValue(BigInteger, BigInteger, Span<byte>)
protected virtual void EncodeValue(BigInteger n, BigInteger x, Span<byte> buffer)
Parameters
nBigIntegerxBigIntegerbufferSpan<byte>
GetMaxEncodingSize(BigInteger)
public virtual int GetMaxEncodingSize(BigInteger n)