Top Description Methods
org.bouncycastle.crypto

public Interface DSA

Known Direct Subinterfaces
org.bouncycastle.crypto.DSAExt
Imports
java.math.BigInteger

interface for classes implementing algorithms modeled similar to the Digital Signature Alorithm.

Method Summary

Modifier and TypeMethod and Description
public BigInteger[]

Returns:

two big integers representing the r and s values respectively.
generateSignature
(byte[]
the message to be signed.
message
)

sign the passed in message (usually the output of a hash function).

public void
init(boolean
true if we are generating a signature, false otherwise.
forSigning
,
CipherParameters
key parameters for signature generation.
param
)

initialise the signer for signature generation or signature verification.

public boolean
verifySignature(byte[]
the message that was supposed to have been signed.
message
,
BigInteger
the r signature value.
r
,
BigInteger
the s signature value.
s
)

verify the message message against the signature values r and s.

Method Detail

generateSignatureback to summary
public BigInteger[] generateSignature(byte[] message)

sign the passed in message (usually the output of a hash function).

Parameters
message:byte[]

the message to be signed.

Returns:BigInteger[]

two big integers representing the r and s values respectively.

initback to summary
public void init(boolean forSigning, CipherParameters param)

initialise the signer for signature generation or signature verification.

Parameters
forSigning:boolean

true if we are generating a signature, false otherwise.

param:CipherParameters

key parameters for signature generation.

verifySignatureback to summary
public boolean verifySignature(byte[] message, BigInteger r, BigInteger s)

verify the message message against the signature values r and s.

Parameters
message:byte[]

the message that was supposed to have been signed.

r:BigInteger

the r signature value.

s:BigInteger

the s signature value.