略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: openssl_pkey_free

2024-11-13

openssl_pkey_free

(PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8)

openssl_pkey_free释放一个私钥

说明

openssl_pkey_free(resource $key): void

该函数释放由openssl_pkey_new()创建的私钥。

参数

key

持有该密钥的资源。

返回值

没有返回值。

add a noteadd a note

User Contributed Notes 2 notes

up
1
suconghou at gmail dot com
1 year ago
PHP 8 deprecates openssl_free_key (actually openssl_pkey_free which it aliases) and automatically destroys the key instance when it goes out of scope.
up
-1
djmaze
2 years ago
This function also frees public key resources as received with openssl_pkey_get_public().

Manual above should say: "Frees a pkey resource"

官方地址:https://www.php.net/manual/en/function.openssl-pkey-free.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3