mcrypt

can't create a Laravel project because mcrypt extension is missing

你。 提交于 2019-12-21 12:56:03
问题 OK, I have seen many posts about this, and I have spent the entire day working through them to solve this issue, with no success. I am trying to create a Laravel project. I am using a Mac (Yosemite), which is running PHP 5.5.14. There is also an older version of PHP on the machine. When I try to create a project from the command line using "laravel new projectname ", no errors are reported, but the command just creates an empty folder named with the project name. I get the "Crafting

PHP using mcrypt and store the encrypted in MySQL

徘徊边缘 提交于 2019-12-21 06:23:15
问题 I am using Mcrypt to encrypt some strings. After that I store them in my database, but in my database it looks like "??f??R?????h$", because many special chars are replaced by a '?'. Do I have to use a special charset or is there another simple way? Regards, Cr41s3 回答1: I think you might be saving the encrypted string's bytes directly into mysql database. You could do something like this to solve your problem: Encryption: Orignal Text > MCrypt Encrypt > Base64 Encode > Store as Plain Text in

Best approach to encrypt big files with php

吃可爱长大的小学妹 提交于 2019-12-21 04:34:28
问题 I'm developing a project in php where it's needed to encrypt files uploaded by users. This files could be from 1mb to 200mb more or less. Searching on the web, I came to the conclusion that the best way to do it was dividing files in chunks of, example, 4096 bytes. So I encrypt every chunk and append it to the full encrypted file. I'm actually using mcrypt and AES-256 encryption in CBC mode. So, my questions are: 1) I have to create a new initial vector for every chunk, or can I get the last

mcrypt blowfish php slightly different results when compared to java and .net

Deadly 提交于 2019-12-21 02:44:09
问题 Here is some example code with altered key values and payload: $key = '/4rTInjwg/H/nA=='; $key = base64_decode($key); $data = 'val=100|val=200|val=300|val=400|val=500|val=600|val=700|val=800|val=900|'; $data.= 'val2=100|val2=200|val2=300|val2=400|val2=500|val2=600|val2=700|val2=800|val2=900|'; $data.= 'val3=100|val3=200|val3=300|val3=400|val3=500|val3=600|val3=700|val3=800|val3=900|'; $data.= 'val4=100|val4=200|val4=300|val4=400|val4=500|val4=600|val4=700|val4=800|val4=900|'; $result = base64

Any Equivalent for mcrypt (in PHP) to use in Java?

跟風遠走 提交于 2019-12-21 02:34:22
问题 Can any one tell about any library that can be used in java, which gives the same result if operation was done in PHP using the mcrypt library. i want to actually encrypt a string in Java using AES, and decrypt it in PHP. Will the Java Cipher yield a encryption decryptable by mcrypt in PHP? edit: Found some resin-3.1 library in Web. Can it be? 回答1: Encryption algorithms are programming language independent. As long as the: Cipher (eg: AES, DES, Blowfish, etc.), Mode of operation (eg: CBC, CTR

PHP: Mcrypt - which mode?

一个人想着一个人 提交于 2019-12-20 10:32:17
问题 I've been testing out the various modes available in PHP's mcrypt function. ECB is the mode used in most tutorials, but isn't recommended by both the just linked page and some users, so I reckon that either CBC or CFB should do the trick. The PHP documentation isn't too fat in it's comparision of the different modes available to mcrypt and instead refers to the book of 'Applied Cryptography by Schneier' , which I am not too keen to buy for the moment. So which of the mcrypt -modes do I want

Error in mcrypt after upgrading into El Capitan OS

ε祈祈猫儿з 提交于 2019-12-20 05:11:21
问题 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? 回答1: Can be a problem related to the new System Integrity Protection or "SIP"? Maybe could be helpful to check permission on the /usr

PHP MCRYPT encrypt/decrypt returns invisible strange characters?

老子叫甜甜 提交于 2019-12-20 04:13:57
问题 mcrypt_decrypt is giving me additional invisible characters which are NOT VISIBLE by just echoing out on the page. Can ONLY BE SEEN by writing it to the text file. Means, just displaying on the page is OK and hard to be noticed. Here is the code sample by Googling. Please guide me what is the correct usage is there's something wrong : function encrypt ($pure_string, $key) { $iv_size = mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_ECB); $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);

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

大兔子大兔子 提交于 2019-12-20 03:27:29
问题 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? 回答1: This is

How to install mcrypt on Docker

自古美人都是妖i 提交于 2019-12-19 19:47:42
问题 I have a Docker Container with Phalcon3 and php 7. I am trying to install the php extension Mcrypt without luck. If I do ssh to the container, and execute: apt-get update apt-get install php7.0-mcrypt I get the following: E: Unable to locate package php7.0-mcrypt E: Couldn't find any package by regex 'php7.0-mcrypt' Is there a way to get it installed? 回答1: Lets look at official manual for php docker image Section PHP Core Extensions For example, if you want to have a PHP-FPM image with iconv,