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
,BcTlsSM2Signer
public abstract class BcTlsSigner extends java.lang.Object implements TlsSigner
-
-
Field Summary
Fields Modifier and Type Field Description protected BcTlsCrypto
crypto
protected org.bouncycastle.crypto.params.AsymmetricKeyParameter
privateKey
-
Constructor Summary
Constructors Modifier Constructor Description protected
BcTlsSigner(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.TlsStreamSigner
getStreamSigner(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: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:
java.io.IOException
- in case of an exception processing the hash.
-
getStreamSigner
public TlsStreamSigner getStreamSigner(SignatureAndHashAlgorithm algorithm)
- Specified by:
getStreamSigner
in interfaceTlsSigner
-
-