array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ja', ), 'this' => array ( 0 => 'function.openssl-x509-fingerprint.php', 1 => 'openssl_x509_fingerprint', ), 'up' => array ( 0 => 'ref.openssl.php', 1 => 'OpenSSL 関数', ), 'prev' => array ( 0 => 'function.openssl-x509-export.php', 1 => 'openssl_x509_export', ), 'next' => array ( 0 => 'function.openssl-x509-free.php', 1 => 'openssl_x509_free', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'ja', 'path' => 'reference/openssl/functions/openssl-x509-fingerprint.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5 >= 5.6.0, PHP 7, PHP 8)
openssl_x509_fingerprint — 与えられた X.509 証明書のフィンガープリントあるいはダイジェストを計算する
$certificate
, string $digest_algo
= "sha1", bool $binary
= false
): string|false
openssl_x509_fingerprint() は
certificate
のダイジェストを文字列で返します。
x509
使用できる値の一覧は キー/証明書パラメータ を参照ください。
digest_algo
"sha256" といったダイジェストメソッド、またはハッシュアルゴリズム。 有効な値の一覧は、openssl_get_md_methods() で得られます。
binary
binary
が true
に設定されていない場合、小文字の8進数として計算された証明書のフィンガープリントを含む文字列を返します。
binary
が true
に設定されている場合、メッセージダイジェストの生のバイナリ表現が返されます。
失敗したときは false
を返します。
バージョン | 説明 |
---|---|
8.0.0 |
certificate は、
OpenSSLCertificate クラスのインスタンスを受け入れるようになりました。
これより前のバージョンでは、
OpenSSL X.509 型のリソースを受け入れていました。
|