Class JcaTlsDSSSigner
java.lang.Object
org.bouncycastle.tls.crypto.impl.jcajce.JcaTlsDSSSigner
- All Implemented Interfaces:
TlsSigner
- Direct Known Subclasses:
JcaTlsDSASigner
,JcaTlsECDSASigner
JCA base class for the signers implementing the two DSA style algorithms from FIPS PUB 186-4: DSA and ECDSA.
-
Field Summary
Modifier and TypeFieldDescriptionprotected final String
protected final short
protected final JcaTlsCrypto
protected final PrivateKey
-
Constructor Summary
ModifierConstructorDescriptionprotected
JcaTlsDSSSigner
(JcaTlsCrypto crypto, PrivateKey privateKey, short algorithmType, String algorithmName) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
generateRawSignature
(SignatureAndHashAlgorithm algorithm, byte[] hash) Generate an encoded signature based on the passed in hash.getStreamSigner
(SignatureAndHashAlgorithm algorithm)
-
Field Details
-
crypto
-
privateKey
-
algorithmType
protected final short algorithmType -
algorithmName
-
-
Constructor Details
-
JcaTlsDSSSigner
protected JcaTlsDSSSigner(JcaTlsCrypto crypto, PrivateKey privateKey, short algorithmType, String algorithmName)
-
-
Method Details
-
generateRawSignature
public byte[] generateRawSignature(SignatureAndHashAlgorithm algorithm, byte[] hash) throws IOException Description copied from interface:TlsSigner
Generate an encoded signature based on the passed in hash.- Specified by:
generateRawSignature
in interfaceTlsSigner
- Parameters:
algorithm
- the signature algorithm to use.hash
- the hash calculated for the signature.- Returns:
- an encoded signature.
- Throws:
IOException
- in case of an exception processing the hash.
-
getStreamSigner
- Specified by:
getStreamSigner
in interfaceTlsSigner
- Throws:
IOException
-