php
"sha512",
"private_key_bits" => 4096,
"private_key_type" => OPENSSL_KEYTYPE_RSA,
);
$rsaKey = openssl_pkey_new($config);
openssl_pkey_export($rsaKey, $privateKey);
// 获取公钥
$publicKey = openssl_pkey_get_details($rsaKey)['key'];
echo "公钥:" . $publicKey;
echo "私钥:" . $privateKey;
?>
顶一下
(0)
0%
踩一下
(0)
0%
- 相关评论
- 我要评论
-