Tagged articles
mcrypt
15 articles · Page 1 of 1
This article explains why PHP7 deprecates the mcrypt extension in favor of OpenSSL, compares DES, 3DES, and AES algorithms, clarifies key length choices, outlines common encryption modes, and provides practical PHP code for encrypting and decrypting data with OpenSSL.
AESOpenSSLPHP
0 likes · 4 min read

This article explains symmetric encryption concepts, lists common algorithms, and demonstrates how to use PHP's mcrypt extension to perform DES and AES encryption and decryption in various modes with complete code examples.
AESDESPHP
0 likes · 7 min read

This article explains the PHP mdecrypt_generic() function, its parameters, and provides a complete example that demonstrates opening an encryption module, encrypting data, decrypting it back, and verifying the result while handling necessary initialization and cleanup steps.
decryptionencryptionmcrypt
0 likes · 2 min read

The article explains the PHP function mcrypt_module_open, detailing its purpose of opening encryption algorithm and mode modules, describing each of its four parameters, default directory behaviors, and the return value indicating success with a resource or failure with FALSE.
PHPencryptioninformation security
0 likes · 2 min read

The PHP function mcrypt_module_close() releases an opened encryption module by taking a resource descriptor as its argument and returns TRUE on success or FALSE on failure, providing a simple way to clean up cryptographic resources in backend applications.
Securityencryptionmcrypt
0 likes · 1 min read

The article explains the PHP mcrypt_get_key_size() function, its prototypes for different libmcrypt versions, the meaning of its cipher and mode parameters, the return value indicating maximum key size, and provides a practical code example demonstrating its usage.
Securityencryptionkey-size
0 likes · 2 min read

The article explains PHP's mcrypt_generic() function, detailing its purpose for encrypting data, required parameters ($td as the encryption descriptor and $data as the plaintext), the need for block-size-aligned input, initialization and cleanup steps, and the nature of its returned encrypted output.
PHPSecurityencryption
0 likes · 2 min read

mcrypt_encrypt encrypts plaintext using a specified cipher, key, mode, and optional IV, returning the ciphertext as a string or FALSE on failure, with detailed explanations of each parameter—including cipher name, key length requirements, data padding, mode options, and IV usage—provided for PHP developers.
BackendPHPmcrypt
0 likes · 2 min read

The PHP function mcrypt_enc_get_key_size returns the maximum key length, in bytes, that the currently opened encryption mode can support, taking a resource descriptor as its sole parameter and providing developers with essential information for handling encryption keys securely.
PHPencryptioninformation security
0 likes · 1 min read

The mcrypt_enc_get_block_size function in PHP returns the block size, in bytes, of the encryption algorithm associated with a given encryption descriptor resource, providing essential information for handling block cipher operations and ensuring correct data padding during encryption and decryption processes.
Block SizePHPencryption
0 likes · 1 min read

The PHP function mcrypt_enc_get_algorithms_name($td) returns the name of the encryption algorithm associated with the given encryption descriptor, providing developers with a string that identifies the algorithm currently in use for cryptographic operations.
PHPencryptioninformation security
0 likes · 1 min read

The PHP mcrypt_decrypt() function decrypts data using a specified cipher, key, mode, and optional initialization vector, returning the plaintext string or FALSE on failure, with detailed parameter descriptions and usage notes.
decryptionencryptioninformation security
0 likes · 2 min read

The article explains how the PHP function mcrypt_create_iv() generates an initialization vector of a given size using various random sources, describes its parameters, default behavior, platform considerations, and return values, emphasizing that the IV need not be kept secret.
PHPinitialization vectormcrypt
0 likes · 2 min read

This article explains the PHP mcrypt_cfb() function, detailing its signature, parameters—including cipher, key, data, mode, and IV—its compatibility with different libmcrypt versions, and the permissible mode constants for encrypting or decrypting data in CFB mode.
CFB modePHPencryption
0 likes · 1 min read

This article explains the PHP mcrypt_cbc() function, detailing its two prototypes for different libmcrypt versions, the full parameter list—including optional IV—and the mode constants MCRYPT_ENCRYPT and MCRYPT_DECRYPT used for CBC‑mode cryptographic operations.
CBCPHPdecryption
0 likes · 1 min read
