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
FieldsModifier and TypeFieldDescriptionprotected final Stringprotected final shortprotected final JcaTlsCryptoprotected final PrivateKey -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJcaTlsDSSSigner(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:TlsSignerGenerate an encoded signature based on the passed in hash.- Specified by:
generateRawSignaturein 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:
getStreamSignerin interfaceTlsSigner- Throws:
IOException
-