Class BcTlsDSSSigner

  • All Implemented Interfaces:
    TlsSigner
    Direct Known Subclasses:
    BcTlsDSASigner, BcTlsECDSASigner

    public abstract class BcTlsDSSSigner
    extends BcTlsSigner
    BC light-weight base class for the signers implementing the two DSA style algorithms from FIPS PUB 186-4: DSA and ECDSA.
    • Constructor Detail

      • BcTlsDSSSigner

        protected BcTlsDSSSigner​(BcTlsCrypto crypto,
                                 org.bouncycastle.crypto.params.AsymmetricKeyParameter privateKey)
    • Method Detail

      • createDSAImpl

        protected abstract org.bouncycastle.crypto.DSA createDSAImpl​(int cryptoHashAlgorithm)
      • getSignatureAlgorithm

        protected abstract short getSignatureAlgorithm()
      • 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 interface TlsSigner
        Overrides:
        generateRawSignature in class BcTlsSigner
        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.