Index: phpdoc/ja/functions/openssl.xml diff -u phpdoc/ja/functions/openssl.xml:1.1 phpdoc/ja/functions/openssl.xml:1.2 --- phpdoc/ja/functions/openssl.xml:1.1 Tue Dec 26 14:23:12 2000 +++ phpdoc/ja/functions/openssl.xml Tue Dec 26 15:27:49 2000 @@ -1,26 +1,26 @@ - OpenSSL Functions + OpenSSL 関数 OpenSSL - This module uses the functions of OpenSSL for generation and verification - of signatures and for sealing (encrypting) and opening (decrypting) - data. You need to use OpenSSL >= 0.9.6 with this module. + このモジュールは、署名の生成および認証、そして、データのシール + (暗号化)およびオープン(復号化)を行うために、OpenSSL の関数を使用します。このモジュー + ルでは、OpenSSL >= 0.9.6 を使用する必要があります。 - OpenSSL offers many features that this module currently doesn't support. - Some of these may be added in the future. + OpenSSL は多くの機能を提供しますが、これらはまだこのモジュールでは + サポートされていません。 openssl_free_key - Free key resource + キーリソースを開放する - Description + 説明 void openssl_free_key @@ -28,8 +28,9 @@ - openssl_free_key frees the key associated with - the specified key_identifier from memory. + openssl_free_key は、指定した + key_identifier が指すキーをメモリから開放 + します。 @@ -37,26 +38,28 @@ openssl_get_privatekey - Prepare a PEM formatted private key for use + PEMフォーマットされた秘密キーを使用可能とする - Description + 説明 int openssl_get_privatekey string key - string passphrase + string + passphrase + - Returns a positive key identifier on success, or false on error. + 成功時に正のキーID、エラー時にfalseを返します。 - openssl_get_privatekey parses the PEM - formatted private key specified by key - and prepares it for use by other functions. - The optional parameter passphrase must be used if - the specified key is encrypted (protected by a passphrase). + openssl_get_privatekey は、 + keyで指定したPEMフォーマットの秘密キーをパー + スし、他の関数で使用可能な状態にします。オプションのパラメータ + passphrase は、指定したキーが暗号化されて + いる場合(passphraseで保護されている)に使用する必要があります。 @@ -64,10 +67,12 @@ openssl_get_publickey - Extract public key from certificate and prepare it for use + + 証明書(certificate)から公開キーを展開し、使用可能とする + - Description + 説明 int openssl_get_publickey @@ -75,13 +80,12 @@ - Returns a positive key identifier on success, or false on error. + 成功時に公開キー、エラー時にfalseを返します。 - openssl_get_publickey extracts the - public key from a X.509 certificate specified by - certificate and prepares it for use by other - functions. + openssl_get_publickey は、 + certificate で指定した X.509 証明書から公 + 開キーを展開し、他の関数で使用可能な状態にします。 @@ -89,10 +93,10 @@ openssl_open - Open sealed data + シール(暗号化)されたデータをオープン(復号)する - Description + 説明 bool openssl_open @@ -103,43 +107,44 @@ - Returns true on success, or false on error. If successful the opened - data is returned in open_data. + 成功時にtrue、エラー時にfalseを返します。成功した場合、オープンさ + れたデータが open_data に返されます。 - openssl_open opens (decrypts) - sealed_data using the private key associtated with - the key identifier priv_key_id and the envelope key - env_key. The envelope key is generated when the - data are sealed and can only be used by one specific private key. See - openssl_seal for more information. + openssl_open は、キーID + priv_key_id およびエンベロープキー + env_key に関連する公開キーを使用して、 + sealed_data をオープン(復号化)します。エン + ベロープキーは、データがシール(暗号化)された際に生成され、特定の + 一つの公開キーでのみ使用することが可能です。詳細な情報については、 + openssl_seal を参照下さい。 - <function>openssl_open</function> example + <function>openssl_open</function> の例 -// $sealed and $env_key are assumed to contain the sealed data -// and our envelope key, both given to us by the sealer. +// $sealed および $env_key に暗号化されたデータおよびエンベロープキー +// が含まれていると仮定。共にシール元(暗号化側)から与えられる。 -// fetch private key from file and ready it +// ファイルから公開キーを取得し、使用可能とする $fp = fopen("/src/openssl-0.9.6/demos/sign/key.pem", "r"); $priv_key = fread($fp, 8192); fclose($fp); $pkeyid = openssl_get_privatekey($priv_key); -// decrypt the data and store it in $open +// データを復号化し、$open に保存 if (openssl_open($sealed, $open, $env_key, $pkeyid)) echo "here is the opened data: ", $open; else echo "failed to open data"; -// free the private key from memory +// 公開キーをメモリから開放 openssl_free_key($pkeyid); - See also openssl_seal. + openssl_seal も参照下さい。 @@ -147,10 +152,10 @@ openssl_seal - Seal data + データをシール(暗号化)する - Description + 説明 int openssl_seal @@ -180,7 +185,7 @@ - <function>openssl_seal</function> example + <function>openssl_seal</function> の例 // $data is assumed to contain the data to be sealed @@ -206,7 +211,7 @@ - See also openssl_open. + openssl_open も参照下さい。 @@ -214,10 +219,10 @@ openssl_sign - Sign data + データの署名 - Description + 説明 bool openssl_sign @@ -227,39 +232,38 @@ - Returns true on success, or false on failure. - If successful the signature is returned in - signature. + 成功時にtrue、失敗した場合にfalseを返します。成功した場合、署名が + signature に返されます。 - openssl_sign computes a signature for the - specified data by using SHA1 for hashing - followed by encryption using the private key associated with - priv_key_id. Note that the data itself is - not encrypted. + openssl_sign は、指定した + data に関してハッシュ計算に SHA1 を使用し + て署名を計算し、その後、priv_key_id で指定 + した公開キーを使用して暗号化を行います。data 自体は暗号化されない + ことに注意して下さい。 - <function>openssl_sign</function> example + <function>openssl_sign</function> の例 -// $data is assumed to contain the data to be signed +// $data に署名するデータが含まれていると仮定 -// fetch private key from file and ready it +// ファイルから公開キーを取得し、使用可能とする $fp = fopen("/src/openssl-0.9.6/demos/sign/key.pem", "r"); $priv_key = fread($fp, 8192); fclose($fp); $pkeyid = openssl_get_privatekey($priv_key); -// compute signature +// 署名を計算 openssl_sign($data, $signature, $pkeyid); -// free the key from memory +// メモリからキーを開放する openssl_free_key($pkeyid); - See also openssl_verify. + openssl_verify も参照下さい。 @@ -267,10 +271,10 @@ openssl_verify - Verify signature + 署名を認証する - Description + 説明 int openssl_verify @@ -280,8 +284,8 @@ - Returns 1 if the signature is correct, 0 if it is incorrect, and - -1 on error. + 署名(signature)が正しい場合に 1、正しくない場合に 0、エラーの場合 + に -1 を返します。 openssl_verify verifies that the @@ -292,7 +296,7 @@ - <function>openssl_verify</function> example + <function>openssl_verify</function> の例 // $data and $signature are assumed to contain the data and the signature @@ -317,7 +321,7 @@ - See also openssl_sign. + openssl_sign も参照下さい。