Top Description Methods
org.bouncycastle.crypto.signers

public Interface DSAEncoding

Known Direct Implementers
org.bouncycastle.crypto.signers.PlainDSAEncoding, org.bouncycastle.crypto.signers.StandardDSAEncoding
Imports
java.io.IOException, java.math.BigInteger

An interface for different encoding formats for DSA signatures.

Method Summary

Modifier and TypeMethod and Description
public BigInteger[]

Returns:

the (r, s) of a DSA signature, stored in an array of exactly two elements, r followed by s.
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
)

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

public byte[]

Returns:

an encoding of the DSA signature given by the provided (r, s) pair.
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
)

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

Method Detail

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

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.

encodeback to summary
public byte[] encode(BigInteger n, BigInteger r, BigInteger s) throws IOException

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.