PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

mcrypt_get_cipher_name> <mcrypt_generic
Last updated: Fri, 20 Jun 2008

view this page in

mcrypt_get_block_size

(PHP 4, PHP 5)

mcrypt_get_block_size — Retourne la taille de blocs d'un chiffrement

Description

int mcrypt_get_block_size ( int $cipher )
int mcrypt_get_block_size ( string $cipher , string $module )

Le premier prototype sert lorsque PHP est compilé avec la bibliothèque libmcrypt 2.2.x, le second lorsqu'il est compilé avec libmcrypt 2.4.x ou 2.5.x.

mcrypt_get_block_size() sert à lire la taille de blocs du chiffrement cipher (en combinaison avec un mode de chiffrement).

Il est mieux de se servir de la fonction mcrypt_enc_get_block_size() comme elle utilise la ressource retournée par mcrypt_module_open().

Cet exemple montre comment utiliser cette fonction lorsque PHP est compilé avec libmcrypt 2.4.x et 2.5.x.

Exemple #1 Exemple avec mcrypt_get_block_size()

<?php
echo mcrypt_get_block_size('tripledes''ecb');
?>

Affichera :
8

Voir aussi mcrypt_get_key_size(), mcrypt_enc_get_block_size() et mcrypt_encrypt().



add a note add a note User Contributed Notes
mcrypt_get_block_size
There are no user contributed notes for this page.

mcrypt_get_cipher_name> <mcrypt_generic
Last updated: Fri, 20 Jun 2008
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites