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.

918 questions
443
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
  • 10,617
  • 11
  • 47
  • 85
218
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
  • 2,959
  • 7
  • 23
  • 27
111
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
  • 1,948
  • 5
  • 13
  • 28
68
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
  • 38,582
  • 71
  • 132
  • 177
53
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
  • 949
  • 2
  • 13
  • 20
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,235
  • 3
  • 14
  • 28
42
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,695
  • 2
  • 17
  • 26
40
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
  • 1,969
  • 5
  • 28
  • 48
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…
user2023687
  • 401
  • 1
  • 5
  • 4
38
votes
5 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,126
  • 3
  • 22
  • 43
35
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,487
  • 12
  • 40
  • 72
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,654
  • 1
  • 17
  • 36
27
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
  • 36,181
  • 63
  • 182
  • 286
23
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
  • 425
  • 3
  • 8
  • 12
22
votes
1 answer

Upgrading my encryption library from Mcrypt to OpenSSL

I am using the below commonly referenced library for encryption. I want to upgrade it to OpenSSL from Mcrypt so that I am no longer using a deprecated library. I'm trying to find out if this is even possible. I've done some research on this, but…
Griffin Meyer
  • 664
  • 7
  • 16
1
2 3
61 62