Re: What is the Mcrypt in PHP?
The following are the Predefined Constants, that are defined by this extension, and are only available when the extension has been compiled into PHP or dynamically loaded at runtime.
- MCRYPT_MODE_ECB (electronic codebook) is suitable for random data, such as keys. Because data are sparse and random, the disadvantages of the ECB have a favorable negative effect.
- MCRYPT_MODE_CBC (cipher block chaining) is especially useful with files whose security ECB is not sufficient.
- MCRYPT_MODE_CFB (cipher feedback) is the best mode for encrypting byte streams where single bytes must be encrypted one by one.
- MCRYPT_MODE_OFB (output feedback, in 8bit) is comparable to CFB, but can be used when errors should not be propagated.
- MCRYPT_MODE_NOFB (output feedback, in nbit) is comparable to OFB, but more secure because it operates with the block size of the algorithm.
- MCRYPT_MODE_STREAM is an additional mode to allow the use of algorithms such "WAKE" or "RC4".
"When they give you ruled paper, write the other way..." J.R.J.
Bookmarks