Class JcaTlsSM2Signer

  • All Implemented Interfaces:
    TlsSigner

    public class JcaTlsSM2Signer
    extends java.lang.Object
    implements TlsSigner
    JCA-based SM2 signer for TLS 1.3 (RFC 8998).
    • Constructor Detail

      • JcaTlsSM2Signer

        public JcaTlsSM2Signer​(JcaTlsCrypto crypto,
                               java.security.PrivateKey privateKey,
                               int signatureScheme)
    • 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 interface TlsSigner
        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.