Package org.bouncycastle.crypto.signers
Class PlainDSAEncoding
java.lang.Object
org.bouncycastle.crypto.signers.PlainDSAEncoding
- All Implemented Interfaces:
DSAEncoding
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected BigIntegercheckValue(BigInteger n, BigInteger x) decode(BigInteger n, byte[] encoding) Decode the (r, s) pair of a DSA signature.protected BigIntegerdecodeValue(BigInteger n, byte[] buf, int off, int len) byte[]encode(BigInteger n, BigInteger r, BigInteger s) Encode the (r, s) pair of a DSA signature.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
PlainDSAEncoding
public PlainDSAEncoding()
-
-
Method Details
-
encode
Description copied from interface:DSAEncodingEncode the (r, s) pair of a DSA signature.- Specified by:
encodein interfaceDSAEncoding- Parameters:
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.- Returns:
- an encoding of the DSA signature given by the provided (r, s) pair.
-
decode
Description copied from interface:DSAEncodingDecode the (r, s) pair of a DSA signature.- Specified by:
decodein interfaceDSAEncoding- Parameters:
n- the order of the group that r, s belong to.encoding- an encoding of the (r, s) pair of a DSA signature.- Returns:
- the (r, s) of a DSA signature, stored in an array of exactly two elements, r followed by s.
-
checkValue
-
decodeValue
-