mcrypt_create_iv --
Create an initialization vector (IV) from a random source
Syntax
string mcrypt_create_iv ( int size [, int source] )
mcrypt_create_iv() is used to create an IV.
Parameter
size determines the size of the IV,
parameter source (defaults to random value)
specifies the source of the IV.
The source can be MCRYPT_RAND (system random
number generator), MCRYPT_DEV_RANDOM (read
data from /dev/random) and
MCRYPT_DEV_URANDOM (read data from
/dev/urandom). MCRYPT_RAND
is the only one supported on Windows because Windows (of course)
doesn't have /dev/random or
/dev/urandom.
Note:
When using MCRYPT_RAND, remember to call
srand() before
mcrypt_create_iv() to initialize the random
number generator; it is not seeded automatically like
rand() is.
The IV is only meant to give an alternative seed to the encryption
routines. This IV does not need to be secret at all, though it can be
desirable. You even can send it along with your ciphertext without
losing security.
mcrypt create iv php code on this is provided for your study purpose, it will guide you to know how create and design a website using php. use it to practice and train your self online
Php mcrypt create iv syntax tutorial
php tutorial guide and code design are for easy learning and programming. The code practice section provided at the top is for practising of this syntax. Use the code section up to practice your php programming online. Learning php is very easy, all you need is to use the examples on this site and practice them to perfect your skills.