Class BcTlsSigner
- java.lang.Object
-
- org.bouncycastle.tls.crypto.impl.bc.BcTlsSigner
-
- All Implemented Interfaces:
TlsSigner
- Direct Known Subclasses:
BcTlsDSSSigner,BcTlsECDSA13Signer,BcTlsEd25519Signer,BcTlsEd448Signer,BcTlsMLDSASigner,BcTlsRSAPSSSigner,BcTlsRSASigner,BcTlsSLHDSASigner,BcTlsSM2Signer
public abstract class BcTlsSigner extends java.lang.Object implements TlsSigner
-
-
Field Summary
Fields Modifier and Type Field Description protected BcTlsCryptocryptoprotected org.bouncycastle.crypto.params.AsymmetricKeyParameterprivateKey
-
Constructor Summary
Constructors Modifier Constructor Description protectedBcTlsSigner(BcTlsCrypto crypto, org.bouncycastle.crypto.params.AsymmetricKeyParameter privateKey)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]generateRawSignature(SignatureAndHashAlgorithm algorithm, byte[] hash)Generate an encoded signature based on the passed in hash.TlsStreamSignergetStreamSigner(SignatureAndHashAlgorithm algorithm)
-
-
-
Field Detail
-
crypto
protected final BcTlsCrypto crypto
-
privateKey
protected final org.bouncycastle.crypto.params.AsymmetricKeyParameter privateKey
-
-
Constructor Detail
-
BcTlsSigner
protected BcTlsSigner(BcTlsCrypto crypto, org.bouncycastle.crypto.params.AsymmetricKeyParameter privateKey)
-
-
Method Detail
-
generateRawSignature
public byte[] generateRawSignature(SignatureAndHashAlgorithm algorithm, byte[] hash) throws java.io.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:
java.io.IOException- in case of an exception processing the hash.
-
getStreamSigner
public TlsStreamSigner getStreamSigner(SignatureAndHashAlgorithm algorithm)
- Specified by:
getStreamSignerin interfaceTlsSigner
-
-