mcrypt

Docker-php-ext-install mcrypt missing folder

懵懂的女人 提交于 2019-12-03 01:13:57
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: /usr/local/bin/docker-php-ext-install [-jN] ext-name [ext-name ...] ie: /usr/local/bin/docker-php-ext-install gd mysqli /usr/local/bin/docker-php-ext-install pdo pdo_mysql /usr/local/bin/docker-php-ext-install -j5 gd mbstring mysqli pdo pdo_mysql shmop if custom ./configure arguments are necessary, see docker-php-ext-configure Possible values for ext-name: bcmath bz2

Error in mcrypt after upgrading into El Capitan OS

痞子三分冷 提交于 2019-12-02 06:32:56
I just upgraded my OS into El Capitan. I had to do some changes in my apache configurations to make everything works as it did before. Thanks for - http://coolestguidesontheplanet.com/get-apache-mysql-php-and-phpmyadmin-working-on-osx-10-11-el-capitan/ One thing that is not working for me is the Mcrypt extension. Anyone knows how to update it to make it work? Can be a problem related to the new System Integrity Protection or "SIP"? Maybe could be helpful to check permission on the /usr folder and change them as needed. After upgrading to El Capitan, mcrypt.so has been moved from /usr/lib/php

Installing Mcrypt extension for PHP on Mac OS X 10.5.8

风流意气都作罢 提交于 2019-12-02 00:40:31
问题 How do I install mcrypt? I'm using Leopard 10.5.8 with PHP5. 回答1: Ok, I just spent 1.5 hours trying to do this myself on 10.6.7 I believe the solution was this: I installed php5-mcrypt + universal with macports: $ sudo macports php5-mcrypt +universal then, you can't just put extension=mycrypt.so in the php.ini file, you have to put the direct path i.e.: extension = /opt/local/lib/php/extensions/no-debug-non-zts-20090626/mcrypt.so you see, PHP looks in /usr/local/lib/php/extensions/no-debug

How can I encrypt/decrypt data using AES CBC+CTS (ciphertext stealing) mode in PHP?

陌路散爱 提交于 2019-12-02 00:16:21
I have to encrypt and decrypt data in AES CTS mode (ciphertext stealing, sometimes referred as AES-XTS) in PHP to interoperate with a remote system written in .NET platform. In .NET 4, this mode is supported natively . For PHP, I cannot find a solution, based on the manual, mcrypt does not seem to have support for this mode. Could anyone please explain the difference between plain CBC and CBC-CTS? Is it possible to make the latter work in PHP with using existing modules/libraries? This is the steps from the wikipedia article interjected with my comments explaining the LDn = Decrypt (K, Cn−1).

Issue with encrypt and decrypt a word docx file in php

↘锁芯ラ 提交于 2019-12-01 23:31:44
I tried to use php mcrypt TripleDES for encryption for docx format files. When i tried to decrypt the file, i am getting the error as follows. The Office Open XML file file_name cannot be opened because there are problems with the contents. Here is the below code function Encrypt($source,$key,$iv) { $cipher = mcrypt_module_open(MCRYPT_3DES, '', 'cbc', ''); mcrypt_generic_init($cipher, $key, $iv); $result = mcrypt_generic($cipher, $source); mcrypt_generic_deinit($cipher); return $result; } function Decrypt($source,$key,$iv) { $cipher = mcrypt_module_open(MCRYPT_3DES, '', 'cbc', ''); mcrypt

How to install mcrypt php 7.2.3 extension in xampp for windows?

半城伤御伤魂 提交于 2019-12-01 23:15:33
问题 My PHP Version 7.2.3 and xampp pack do not have the mcrypt extension. It is not mentioned in the phpinfo() neither in the php.ini file in order to enable it. I have downloaded mcrypt from this link: https://sourceforge.net/projects/mcrypt/ but I don't know how to integrate it as php extension. I need solution for xampp in windows please 回答1: You don't See http://php.net/manual/en/intro.mcrypt.php This feature was DEPRECATED in PHP 7.1.0 , and REMOVED in PHP 7.2.0 . Alternatives to this

Installing Mcrypt extension for PHP on Mac OS X 10.5.8

China☆狼群 提交于 2019-12-01 20:22:08
How do I install mcrypt? I'm using Leopard 10.5.8 with PHP5. Ok, I just spent 1.5 hours trying to do this myself on 10.6.7 I believe the solution was this: I installed php5-mcrypt + universal with macports: $ sudo macports php5-mcrypt +universal then, you can't just put extension=mycrypt.so in the php.ini file, you have to put the direct path i.e.: extension = /opt/local/lib/php/extensions/no-debug-non-zts-20090626/mcrypt.so you see, PHP looks in /usr/local/lib/php/extensions/no-debug-non-zts-20090626/ which is the difference I missed!! Then just restart apache with your $ sudo apachectl -k

Moving from mcrypt with Blowfish & ECB to OpenSSL

笑着哭i 提交于 2019-12-01 17:57:11
In the (not too distant) past a decision has been made (by someone who longer works here) to always 'encrypt' database IDs to something else, on the fly, whenever it was needed for external communication. Now, we've moved from PHP 5.x to PHP 7.0 for our main application, and our microservices scattered across our infrastructure are running either 7.0 or 7.1. The 7.1 servers keep throwing deprecation warnings for the mcrypt stuff. No biggie, just yet. But with PHP 7.2 around the corner, we want to keep updating and upgrading. Mcrypt is blocking. To save all the currently encrypted values in 60

Encrypting in PHP (mcrypt), Decrypting in Ruby (OpenSSL::Cipher)

二次信任 提交于 2019-12-01 11:23:05
I'm working on a cross language project wrapping a ruby/Sinatra API in PHP to be consumed by another team. None of the information exposed by the API is sensitive, but we would prefer it not be easily accessible to a casual observer guessing the URL. private function generateSliceIDToken($key){ $currentEpoch = time(); $ivSize = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC); $iv = mcrypt_create_iv($ivSize, MCRYPT_RAND); $encryptedBytes = mcrypt_encrypt( MCRYPT_RIJNDAEL_128, $key, $currentEpoch.**Passcode**, MCRYPT_MODE_CBC, $iv ); $ivAndEncryptedBytes = $iv . $encryptedBytes; return

mcrypt_decrypt PHP proper usage

做~自己de王妃 提交于 2019-12-01 09:57:17
I think my PHP intall might have problems. When I try to do this I get Warning: mcrypt_decrypt() [function.mcrypt-decrypt]: Module initialization failed I am writing a small snippet of code that will decrypt the following string encrypted with AES-128 using mode ECB. Key (encoded in base64): aXJhbmRvbXNlY3VyZWtleQ== Encrypted string> (encoded in base64): 3l6xiNdgRG+PkBw5M0lawvJ/fmuTZPRhEcbtqAmOpDI= I keep getting module errors. This is what I have tried: <?PHP $retval = mcrypt_decrypt( "AES-128", base64_decode( "aXJhbmRvbXNlY3VyZWtleQ=="), base64_decode( "3l6xiNdgRG+PkBw5M0lawvJ