★ wanayoo — archive 1999 http://www.php.net/manual/ja/function.mcrypt-module-open.phpNouvelle recherche | Portail wanayoo

PHP Home Page

Manual Table of Contents
Up to mcrypt
Quick Reference
English version of this page
mcrypt
* mcrypt_get_cipher_name
* mcrypt_get_block_size
* mcrypt_get_key_size
* mcrypt_create_iv
* mcrypt_cbc
* mcrypt_cfb
* mcrypt_ecb
* mcrypt_ofb
* mcrypt_list_algorithms
* mcrypt_list_modes
* mcrypt_get_iv_size
* mcrypt_encrypt
* mcrypt_decrypt
* mcrypt_module_open
* mcrypt_generic_init
* mcrypt_generic
* mdecrypt_generic
* mcrypt_generic_end
* mcrypt_enc_self_test
* mcrypt_enc_is_block_algorithm_mode
* mcrypt_enc_is_block_algorithm
* mcrypt_enc_is_block_mode
* mcrypt_enc_get_block_size
* mcrypt_enc_get_key_size
* mcrypt_enc_get_supported_key_sizes
* mcrypt_enc_get_iv_size
* mcrypt_enc_get_algorithms_name
* mcrypt_enc_get_modes_name
* mcrypt_module_self_test
* mcrypt_module_is_block_algorithm_mode
* mcrypt_module_is_block_algorithm
* mcrypt_module_is_block_mode
* mcrypt_module_get_algo_block_size
* mcrypt_module_get_algo_key_size
* mcrypt_module_get_algo_supported_key_sizes
Manual: mcrypt_module_open
View the source code for this pageSearch the site



Previous page
 mcrypt_decrypt
 Updated
Mon, 14 Aug 2000
mcrypt_generic_init 
Next page


mcrypt_module_open

(unknown)

mcrypt_module_open --  使用するアルゴリズムおよびモードのモジュールをオープンする

説明

resource mcrypt_module_open (string algorithm, string algorithm_directory, string mode, string mode_directory)

この関数は、使用するアルゴリズムおよびモードのモジュールをオープ ンします。アルゴリズム名は、"twofish" または定数 MCRYPT_暗号名に より algorithm で指定します。 ライブラリはmcrypt_module_close()をコールする ことによりクローズされますが、 mcrypt_generic_end()をコールする場合には、この 関数をコールする必要はありません。通常、この関数は暗号化ディスク クリプタを返し、エラーの際にfalseを返します。

暗号化モジュールの位置を指定する際には algorithm_directory および mode_directory が使用されます。 ディレクトリ名を指定した場合には、これが使用されます。 これらの一つに空の文字列("")を指定した場合、ini ディエクティブの mcrypt.algorithms_dir または mcrypt.modes_dirに設定された値が使用されま す。これらが設定されていない場合、libmcryptをコンパイルした際のデ フォルトのディレクトリ (通常は/usr/local/lib/libmcrypt)が使用され ます。

例 1. mcrypt_module_open() の例


<?php
$td = mcrypt_module_open (MCRYPT_DES, "", MCRYPT_MODE_ECB, "/usr/lib/mcrypt-modes");
?>
      
上記の例は、デフォルトのディレクトリからDES暗号、ディレクトリ /usr/lib/mcrypt-modesからEBCモードをオープンします。


 About Notes


Previous page
 mcrypt_decrypt
 Updated
Mon, 14 Aug 2000
mcrypt_generic_init 
Next page





Who's responsible for this?
Top of this page

Site
Hosting:



Located in
United States
Elements of this website are subject to copyright.
Questions about installing or using PHP should be directed to one of the mailing lists.
Only questions about the website should be directed to webmaster@php.net.