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
8
votes
1 answer

Cannot install mcrypt via homebrew OSX Yosemite

Running OSX 10.10.1. I installed homebrew, and then tried running the following command: brew install mcrypt After which, it went through a long process of downloading/installing files. It then gave me an error: checking for mhash_keygen in…
boisterouslobster
  • 1,283
  • 3
  • 25
  • 54
8
votes
4 answers

How to install mcrypt extension on mac os x yosemite (10.10)

I've updated my Mac OS X to Yosemite, but doing that I over write all my dev environment. So now, to run Laravel 4 on my local apache I need to install the Mcrypt extension, but everything that i've tried i fail. Even the steps that have worked on…
Anubz
  • 182
  • 1
  • 2
  • 9
8
votes
4 answers

Laravel : "mcrypt_decrypt(): The IV parameter must be as long as the blocksize"

I ran composer update on a Laravel application, and now I am getting this error: mcrypt_decrypt(): The IV parameter must be as long as the blocksize What happened?!
Kousha
  • 32,871
  • 51
  • 172
  • 296
8
votes
2 answers

Installing mcrypt with PHP on mac

I am trying to install the mcrypt extension for PHP on my mac. I used the homebrew command to install it brew install php53-mcrypt This gives me a message saying that it is already installed: php53-mcrypt-5.3.26 already installed However, when I…
Ashish Agarwal
  • 14,555
  • 31
  • 86
  • 125
8
votes
1 answer

Mcrypt and base64 with PHP and c#

I have written the same methods in two platforms which I believe should result same thing but its not happening. I have encrypted the same text with same key which result different. Can someone figure it out why is it happening ? String: this is…
hsuk
  • 6,770
  • 13
  • 50
  • 80
8
votes
3 answers

PHP mcrypt not compiled properly

I have tried everything but I not able to fix this error. I installed PHP by downloading it and then ran: brew install php55-mcrypt I had initially installed it with PHP 5.3 then Laravel complained that it has to be greater than 5.4. So everything…
Fox
  • 9,384
  • 13
  • 42
  • 63
8
votes
1 answer

Hash::make('password') returning different results at every call

So,the title basically describes my problem. My Hash:make() is gone crazy. I've created a users table with a hashed password, but I can't get Laravel to accept my credentials and I think the problem is in the Hash::make. So, test this…
Magus
  • 2,905
  • 28
  • 36
8
votes
2 answers

PHP MCRYPT keeps throwing Module initialization failed Warning

Every time I try to run m_decrypt, I have the following error thrown: Warning: mcrypt_get_key_size(): Module initialization failed in /var/www/milo/system/encryption/common.php on line 51 Warning: mcrypt_get_block_size(): Module initialization…
George Milonas
  • 553
  • 7
  • 22
8
votes
1 answer

PHP - Replacing mcrypt_create_iv() with openssl_random_pseudo_bytes()

I need to up the security of our website, and is currently using the guide here: http://crackstation.net/hashing-security.htm, and also the generation of random passwords here: https://defuse.ca/generating-random-passwords.htm. I gather that both…
shippou
  • 95
  • 1
  • 1
  • 8
8
votes
2 answers

MCRYPT_DEV_RANDOM freezes but MCRYPT_DEV_URANDOM works

I am trying to create an IV with the function: mcrypt_create_iv(32, MCRYPT_DEV_RANDOM) this causes the script to time out after more than 60 seconds. (maybe more?) but when I use URANDOM, it works fine almost instantly. From what I read it should…
macdabby
  • 196
  • 1
  • 8
7
votes
4 answers

Keeping secret key SECRET - within Android app.. any ideas

I have an mcrypt encryption and decryption routine within one of my Android apps. This is essentially decrypting a string which is fetched via. remote call. Naturally the "secret key" is stored within the code, but anyone with apktool can…
OmniCoder
  • 117
  • 1
  • 8
7
votes
1 answer

Problem installing mcrypt on PHP 7.3.13 Ubuntu

This is what I have been doing. $ sudo apt-get -y install gcc make autoconf libc-dev pkg-config $ sudo apt-get -y install libmcrypt-de $ sudo pecl install mcrypt-1.0.2 > libmcrypt prefix? [autodetect] : Im adding "extension=mcrypt.so" to php.ini…
7
votes
2 answers

Data corruption: Where's the bug‽

Last edit: I've figured out what the problem was (see my own answer below) but I cannot mark the question as answered, it would seem. If someone can answer the questions I have in my answer below, namely, is this a bug in Cython or is this Cython's…
Michael Trausch
  • 3,187
  • 1
  • 21
  • 29
7
votes
3 answers

Replacing mcrypt_encrypt using MCRYPT_RIJNDAEL_256 with openssl_encrypt

As you guys probably know, the extension mcrypt will be deprecated on php 7.1. I use to maintain a "legacy" application that I want to migrate eventually to this version so I ran the tests and verified that I can't get 100% of coverage anymore,…
William Okano
  • 370
  • 1
  • 3
  • 10
7
votes
1 answer

PHP: Warning mcrypt_generic_init(): Iv size is incorrect; supplied length: 12, needed: 8

Basic Facts: $algorithm = MCRYPT_BLOWFISH; $mode = MCRYPT_MODE_CBC; $randSource = MCRYPT_DEV_URANDOM; Note This is not a strict coding question. Context: CentOS 7, Apache 2.4.12, & PHP 5.6.20. I am making an HTML email with a "verify your…
Anthony Rutledge
  • 6,980
  • 2
  • 39
  • 44