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
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final BcTlsCryptoprotected final org.bouncycastle.crypto.params.AsymmetricKeyParameter -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBcTlsSigner(BcTlsCrypto crypto, org.bouncycastle.crypto.params.AsymmetricKeyParameter privateKey) -
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
protected final org.bouncycastle.crypto.params.AsymmetricKeyParameter privateKey
-
-
Constructor Details
-
BcTlsSigner
protected BcTlsSigner(BcTlsCrypto crypto, org.bouncycastle.crypto.params.AsymmetricKeyParameter privateKey)
-
-
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
-