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

PHP Home Page

Manual Table of Contents
Up to mcrypt
Quick Reference
mcrypt
English version of this pageJapanese version of this page
* 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

  Thanks to:
 Chek.com
 easyDNS
 VA Linux Systems

  Related sites:
Apache
MySQL
PostgreSQL
Zend Tech.

  Community:
LinuxFund.org
OSDN
Manual: mcrypt_generic_init
View the source code for this pageSearch the site



Previous page
 mcrypt_module_open
 Updated
Fri, 15 Sep 2000
mcrypt_generic 
Next page


mcrypt_generic_init

(PHP4 >= 4.0.2)

mcrypt_generic_init -- 暗号化に必要な全てのバッファを初期化する

説明

int mcrypt_generic_init (resource td, string key, string iv)

キーの最大長は、mcrypt_enc_get_key_size()をコー ルした際に得られるキー長の一つである必要があり、この値より小さな 値は全て有効です。IVは通常そのアルゴリズムのブロック長と同じ大き さですが、mcrypt_enc_get_iv_size()をコールする ことにより、その大きさを得る必要があります。IVはECBでは無視されま す。IVはCFB、CBC、STREAM、nOFBでは必須です。 IVはランダムで一意である必要があります(しかし、秘密ではある必要 はありません)。暗号化と複合化で同じIVを使用する必要があります。 IVを使用したくない場合にはゼロに設定しますが、これは推奨されませ ん。この関数はエラーの際に (-1) を返します。

mcrypt_generic() または mdecrypt_generic() をコールする前に常にこの関 数をコールする必要があります。


 About Notes


Previous page
 mcrypt_module_open
 Updated
Fri, 15 Sep 2000
mcrypt_generic 
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.