Questions tagged [mcrypt]

MCrypt, and the accompanying libmcrypt, are intended to be replacements for the old Unix crypt, except that they are under the GPL and support an ever-wider range of algorithms and modes. MCrypt has not been updated since 2007

MCrypt implements numerous cryptographic algorithms, mostly block ciphers and stream ciphers, some of which falls under export restrictions in the United States. Algorithms include , , arcfour, enigma, ghost, LOKI97, RC2, serpent, threeway, twofish, wake, XTEA

Caution

Please note that the MCrypt library has not been updated since 2007. The PHP project has moved to deprecate and ultimately remove MCrypt from the PHP core and other projects will likely follow suit. It is highly recommended you switch to OpenSSL or another maintained encryption project.

922 questions
0
votes
1 answer

Substitute Horde/phpmyadmin blowfish.php for mcrypt

I'm trying pass data between applications that was encrypted using the Horde/phpmyadmin blowfish.php library, using mcrypt instead. If I do something like: $key = "qwerty"; $data = "12345678"; $pma_cipher = new Horde_Cipher_blowfish; print…
Andrew
  • 192
  • 10
0
votes
3 answers

how to use mcrypt decryption

i have made a login and register page. but my passwords aren't encrypted yet. people told me that's a bad idea and that i should encrypt them. so i have been searching around on how to encrypt and decrypt my passwords. i have found an example on how…
jannes braet
  • 1
  • 2
  • 8
0
votes
1 answer

How to encrypt/encode an array in an url friendly format better than using serialize and base64

I'm currently using this code to generate an hyperlink in an .xls file from an intranet server. This .xls file is an order I submit by email to one of my supplier. /* WEBSERVER1 */ …
baptme
  • 10,062
  • 3
  • 52
  • 57
0
votes
1 answer

php mcrypt decrypting not working as expected

I'm using PHP mcrypt to encrypt and decrypt values to a flat file in Windows 7. If I write the value directly with no other information and decrypt it out of the file the algorithm works fine. If I try to encode it as a key/value pair…
Mike Preston
  • 153
  • 1
  • 9
0
votes
1 answer

Best practice for a simple encryption class. Am I using crypt and mcrypt well?

These days I read a lot here on SO about password hashing and data encryption. It's a real mess, I mean, deciding what the best practice is. I need a very simple class that can be reused anywhere and that provide a decent-but-not-paranoic security…
lorenzo-s
  • 16,603
  • 15
  • 54
  • 86
0
votes
1 answer

mcrypt/mysql syntax error on login page

I've got such code as an auth file for my CMS on login page: //$login=true; $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB); $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); $key_hex =…
Spacedust
  • 931
  • 1
  • 11
  • 22
0
votes
1 answer

terminal version of mcrypt

I'm trying to use the terminal version of mcrypt but I haven't success... I writed: mcrypt -a xtea -m ecb -k "qawsedrftgyhujik" test > testresult where: xtea is the algorithm ecb is the mode qawsedrftgyhujik is the 128bits key test is the source…
uDalillu
  • 955
  • 8
  • 11
0
votes
1 answer

Rijndael-256 Encryption Decryption in PHP

I have a situation where I have to encrypt and decrypt SOAP xml in PHP. I am trying to encrypt the Envelope of a soap xml. Encryption is working, but decryption is not. For encryption and decryption I use the code specified in this…
user922834
  • 195
  • 2
  • 6
  • 18
0
votes
2 answers

Using mcrypted values in URL

I wrote a little class to send private data with the url (can't use cookies/sessions or anything else for it). I encrypt/decrypt it with PHP's mcrypt and also base64-en/decoded it for use in the url. Unfortunately I still end up with wrong results…
Anonymous
  • 3,679
  • 6
  • 29
  • 40
0
votes
3 answers

Transfering encrypted data server to server, between 2 PHP scripts

I need to transfer data from a PHP script on my local server to a remote API (also written in PHP) on my hosting server. It is basically a primitive version control system, and I use both HTTP GET and HTTP POST to transfer files and strings. I would…
ejm
  • 782
  • 7
  • 16
0
votes
1 answer

How to view the source code for the encryption and decryption functions in php?

I want to view the source code for the various encryption and decryption functions used by PHP . How can I do so? I use Xampp.
-1
votes
2 answers

Class not found?

I am using MCrypt.php index.php include("MCrypt.php"); $crypter = new MCrypt(); MCrypt.php exists in same directory. when I run index.php I get Fatal error: Class 'MCrypt' not found in /home/username/project/index.php on line 5 UPDATE: I have…
KJW
  • 15,035
  • 47
  • 137
  • 243
-1
votes
1 answer

PHP mcrypt error: PHP Warning: PHP Startup: Unable to load dynamic library 'php_mcrypt'

I extracted mcrypt to C:\xampp\php\ext, updated the php.ini with extension=php_mcrypt, rebooted the Apache server, and steel I get: Unable to load dynamic library 'php_mcrypt' (tried: C:\xampp\php\ext\php_mcrypt... Also I cant see the module with…
GBU
  • 1
-1
votes
1 answer

Converting mcrypt_encrypt to openssl_encrypt in PHP

As mcrypt_encrypt is removed from PHP 8, I need to convert the following code to using openssl_encrypt function encryptValue($input,$sKey) { $key = hex2bin($sKey); $block = mcrypt_get_block_size(MCRYPT_RIJNDAEL_128,…
WebNovice
  • 2,230
  • 3
  • 24
  • 40
-1
votes
1 answer

Triple DES Mcrypt Replacement in PHP 7

I have the following function that is written in php function encrypt($string) { //Key $key = "key"; //Encryption $cipher_alg = MCRYPT_TRIPLEDES; $iv =…
techno
  • 6,100
  • 16
  • 86
  • 192