Top Fields Constructors Methods
org.bouncycastle.crypto.signers

public Class PlainDSAEncoding

extends Object
implements DSAEncoding
Class Inheritance
All Implemented Interfaces
org.bouncycastle.crypto.signers.DSAEncoding
Imports
java.math.BigInteger, org.bouncycastle.util.Arrays, .BigIntegers

Field Summary

Modifier and TypeField and Description
public static final PlainDSAEncoding

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
decodeValue(BigInteger n, byte[] buf, int off, int len)

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.

private void
encodeValue(BigInteger n, BigInteger x, byte[] buf, int off, int len)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
public static final PlainDSAEncoding INSTANCE

Constructor Detail

PlainDSAEncodingback to summary
public PlainDSAEncoding()

Method Detail

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

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, byte[] buf, int off, int len)
encodeback to summary
public byte[] encode(BigInteger n, BigInteger r, BigInteger s)

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
private void encodeValue(BigInteger n, BigInteger x, byte[] buf, int off, int len)