Top Fields Constructors Methods
org.bouncycastle.crypto.signers

public Class StandardDSAEncoding

extends Object
implements DSAEncoding
Class Inheritance
All Implemented Interfaces
org.bouncycastle.crypto.signers.DSAEncoding
Imports
java.io.IOException, java.math.BigInteger, org.bouncycastle.asn1.ASN1EncodableVector, .ASN1Encoding, .ASN1Integer, .ASN1Primitive, .ASN1Sequence, .DERSequence, org.bouncycastle.util.Arrays

Field Summary

Modifier and TypeField and Description
public static final StandardDSAEncoding

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected BigInteger
public BigInteger[]
decode(BigInteger
the order of the group that r, s belong to.
n
,
byte[]
an encoding of the (r, s) pair of a DSA signature.
encoding
)

Implements org.bouncycastle.crypto.signers.DSAEncoding.decode.

Decode the (r, s) pair of a DSA signature.
protected BigInteger
public byte[]
encode(BigInteger
the order of the group that r, s belong to.
n
,
BigInteger
the r value of a DSA signature.
r
,
BigInteger
the s value of a DSA signature.
s
)

Implements org.bouncycastle.crypto.signers.DSAEncoding.encode.

Encode the (r, s) pair of a DSA signature.
protected void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
public static final StandardDSAEncoding INSTANCE

Constructor Detail

StandardDSAEncodingback to summary
public StandardDSAEncoding()

Method Detail

checkValueback to summary
protected BigInteger checkValue(BigInteger n, BigInteger x)
decodeback to summary
public BigInteger[] decode(BigInteger n, byte[] encoding) throws IOException

Implements org.bouncycastle.crypto.signers.DSAEncoding.decode.

Doc from org.bouncycastle.crypto.signers.DSAEncoding.decode.

Decode the (r, s) pair of a DSA signature.

Parameters
n:BigInteger

the order of the group that r, s belong to.

encoding:byte[]

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.

decodeValueback to summary
protected BigInteger decodeValue(BigInteger n, ASN1Sequence s, int pos)
encodeback to summary
public byte[] encode(BigInteger n, BigInteger r, BigInteger s) throws IOException

Implements org.bouncycastle.crypto.signers.DSAEncoding.encode.

Doc from org.bouncycastle.crypto.signers.DSAEncoding.encode.

Encode the (r, s) pair of a DSA signature.

Parameters
n:BigInteger

the order of the group that r, s belong to.

r:BigInteger

the r value of a DSA signature.

s:BigInteger

the s value of a DSA signature.

Returns:byte[]

an encoding of the DSA signature given by the provided (r, s) pair.

encodeValueback to summary
protected void encodeValue(BigInteger n, ASN1EncodableVector v, BigInteger x)