public class StandardDSAEncoding extends Object implements DSAEncoding
Modifier and Type | Field and Description |
---|---|
static StandardDSAEncoding |
INSTANCE |
Constructor and Description |
---|
StandardDSAEncoding() |
Modifier and Type | Method and Description |
---|---|
protected BigInteger |
checkValue(BigInteger n,
BigInteger x) |
BigInteger[] |
decode(BigInteger n,
byte[] encoding)
Decode the (r, s) pair of a DSA signature.
|
protected BigInteger |
decodeValue(BigInteger n,
ASN1Sequence s,
int pos) |
byte[] |
encode(BigInteger n,
BigInteger r,
BigInteger s)
Encode the (r, s) pair of a DSA signature.
|
protected void |
encodeValue(BigInteger n,
ASN1EncodableVector v,
BigInteger x) |
public static final StandardDSAEncoding INSTANCE
public byte[] encode(BigInteger n, BigInteger r, BigInteger s) throws IOException
DSAEncoding
encode
in interface DSAEncoding
n
- the order of the group that r, s belong to.r
- the r value of a DSA signature.s
- the s value of a DSA signature.IOException
public BigInteger[] decode(BigInteger n, byte[] encoding) throws IOException
DSAEncoding
decode
in interface DSAEncoding
n
- the order of the group that r, s belong to.encoding
- an encoding of the (r, s) pair of a DSA signature.IOException
protected BigInteger checkValue(BigInteger n, BigInteger x)
protected BigInteger decodeValue(BigInteger n, ASN1Sequence s, int pos)
protected void encodeValue(BigInteger n, ASN1EncodableVector v, BigInteger x)
Copyright © 2020 BouncyCastle.org. All rights reserved.