top of page
CerebroSQL

CREATE_ASYMMETRIC_PRIV_KEY

База данных: MySQL

68747470733a2f2f7374796c65732e7265646469746d656469612e636f6d2f74355f32716d366b2f7374796c65

Syntax:
create_asymmetric_priv_key(algorithm, {key_len|dh_secret})

Creates a private key using the given algorithm and key length or DH
secret, and returns the key as a binary string in PEM format. If key
generation fails, the result is NULL.

Supported algorithm values: 'RSA', 'DSA', 'DH'

Supported key_len values: The minimum key length in bits is 1,024. The
maximum key length depends on the algorithm: 16,384 for RSA and 10,000
for DSA. These key-length limits are constraints imposed by OpenSSL.
Server administrators can impose additional limits on maximum key
length by setting environment variables.
For DH keys, pass a shared DH secret instead of a key length. To create
the secret, pass the key length to create_dh_parameters().

Example

SET @priv = create_asymmetric_priv_key('DSA', 2048);
SET @pub = create_asymmetric_pub_key('DSA', @priv);

bottom of page