Syntax:
asymmetric_sign(algorithm, text, priv_key_str, digest_type)

Signs a digest string or data string using a private key, and returns
the signature as a binary string. If signing fails, the result is NULL.

For the legacy version of this function in use before MySQL 8.0.29, see
https://dev.mysql.com/doc/refman/8.0/en/enterprise-encryption-functions
-legacy.html.

algorithm is the encryption algorithm used to create the key. The
supported algorithm value is 'RSA'.

text is a data string or digest string. The function accepts digests
but does not require them, as it is also capable of handling data
strings of an arbitrary length. A digest string can be generated by
calling create_digest().

priv_key_str is the private key string to use for signing the digest
string. It must be a valid PEM encoded RSA private key.

digest_type is the algorithm to be used to sign the data. The supported
digest_type values are 'SHA224', 'SHA256', 'SHA384', and 'SHA512' when
OpenSSL 1.0.1 is in use. If OpenSSL 1.1.1 is in use, the additional
digest_type values 'SHA3-224', 'SHA3-256', 'SHA3-384', and 'SHA3-512'
are available.

For a usage example, see the description of asymmetric_verify().

URL: https://dev.mysql.com/doc/refman/8.0/en/enterprise-encryption-functions.html

