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
458
votes
22 answers

Laravel requires the Mcrypt PHP extension

I am trying to use the migrate function in Laravel 4 on OSX. However, I am getting the following error: Laravel requires the Mcrypt PHP extension. As far as I understand, it's already enabled (see the image below). What is wrong, and how can I fix…
Patrick Reck
  • 11,246
  • 11
  • 53
  • 86
219
votes
8 answers

Best way to use PHP to encrypt and decrypt passwords?

Possible Duplicate: PHP 2-way encryption: I need to store passwords that can be retrieved I plan to store foreign account information for my users on my website, aka rapidshare username and passwords, etc... I want to keep information secure, but…
jiexi
  • 3,019
  • 7
  • 26
  • 28
126
votes
10 answers

mcrypt is deprecated, what is the alternative?

The mcrypt-extension is deprecated will be removed in PHP 7.2 according to the comment posted here. So I am looking for an alternative way to encrypt passwords. Right now I am using something like mcrypt_encrypt(MCRYPT_RIJNDAEL_128, md5($key, true),…
Piet
  • 2,188
  • 5
  • 19
  • 30
69
votes
19 answers

Fatal error: Call to undefined function mcrypt_encrypt()

NOTE: The libraries MCrypt support depend on have not been updated in years and MCrypt should no longer be considered a viable or secure method of encrypting data. What's more, MCrypt has been deprecated in PHP 5, and removed entirely in PHP 7. If…
Jin Yong
  • 42,698
  • 72
  • 141
  • 187
56
votes
9 answers

Best practices for storing bank information in a database

Summary of answers: Don't do it. The legal and financial implications will be disastrous. Look for established third party solutions or hire an expert. Never store any sensitive information on a shared server. Research for the most appropriate…
pistolshrimp
  • 1,009
  • 2
  • 14
  • 21
49
votes
3 answers

Docker-php-ext-install mcrypt missing folder

I try to install mcrypt in my docker image based on php:7.2-apache. Therefore I use the RUN-Command from the documentation and also answerd here but I receive this error: error: /usr/src/php/ext/mcrypt does not exist usage:…
Gerrit
  • 2,515
  • 5
  • 38
  • 63
48
votes
10 answers

can't find mcrypt => Call to undefined function Laravel\mcrypt_create_iv()

Trying to set up Laravel and keep getting hit with this error. I installed mcrypt through brew and it is located in /usr/local/Cellar. Any thoughts? .. It's not showing up in terminal command php -m either, if that matters. I'm running Mountaion…
coryj
  • 1,255
  • 3
  • 14
  • 29
43
votes
9 answers

How can I install mcrypt under PHP7? Laravel needs it

Since Laravel4 requires mcrypt extension, and PHP7 doesn't seem to have mcrypt extension, is there any workaround for this to work?
Bishal Paudel
  • 1,896
  • 2
  • 21
  • 28
40
votes
16 answers

Installing mcrypt extension for PHP on OSX Mountain Lion

Apologies in advance for the potential n00b questions, I am trying to install the mcrypt extension for PHP on my OSX Mountain Lion machine. The following steps in terminal is what I have done so far to achieve my PHP install cd…
Daze
  • 506
  • 1
  • 6
  • 6
39
votes
7 answers

Generate an N-digit random number

I want to generate a 6 digit random number using the PHP mt_rand() function. I know the PHP mt_rand() function only takes 2 parameters: a minimum and a maximum value. How can I do that?
Saleh
  • 2,657
  • 12
  • 46
  • 73
39
votes
6 answers

Issue in installing php7.2-mcrypt

As I'm trying to load mcrypt extension module from PHP 7.2.X version. So I tried to make use of PECL library that is compatible to the current version of my PHP, in order to get installed and followed this link: Installing mcrypt on PHP 7.2 during…
Nɪsʜᴀɴᴛʜ ॐ
  • 2,756
  • 4
  • 33
  • 57
31
votes
2 answers

Nix Composable Derivation Options

I'm trying to understand what options are available for me in my configuration.nix for particular programs, by searching the pkgs sub-folder of nixpkgs's source tree, picking out the module's definitions to understand the available options. However,…
Athan Clark
  • 3,886
  • 2
  • 21
  • 39
26
votes
7 answers

Which PHP mcrypt cipher is safest?

So guys, there's plenty of different ciphers available - but which one is the safest to use nowadays? List: http://www.php.net/manual/en/mcrypt.ciphers.php
Industrial
  • 41,400
  • 69
  • 194
  • 289
25
votes
5 answers

How to install mcrypt extension in xampp

how to install mcrypt in xampp on windows? My PHP Version 7.0.5 and xampp pack have not mcrypt extension so how can i install mcrypt on xampp ?
Dhaval Koradiya
  • 424
  • 1
  • 6
  • 11
24
votes
4 answers

Encrypting / Decrypting file with Mcrypt

Trying to write a couple of functions that will encrypt or decrypt a file and am using the class found here to try and accomplish this: http://www.itnewb.com/v/PHP-Encryption-Decryption-Using-the-MCrypt-Library-libmcrypt The encryption function…
whitman6732
  • 465
  • 3
  • 8
  • 12
1
2 3
61 62