Questions tagged [mcrypt]

1

votes
1

answer
2k

Views

Install php70-mcrypt on mac high sierra

I've installed mcrypt using Homebrew but it doesn't seem to be loading. I installed by running: brew install php70-mcrypt When I run phpinfo() in a browser I don't see mcrypt installation details (apart from the module authors). Is nginx using the same php that I get from the command line? Or am I n...
Ben
1

votes
0

answer
826

Views

Notice: Use of undefined constant MCRYPT_BLOWFISH - assumed 'MCRYPT_BLOWFISH'

While trying to run magento project in my machine I'm getting this exception main.CRITICAL: Notice: Use of undefined constant MCRYPT_BLOWFISH - assumed 'MCRYPT_BLOWFISH'. OS version: macOS High Sierra version 10.13.2 php version: PHP 7.1.13 (cli) (built: Jan 5 2018 15:31:15) ( NTS ) I've added thi...
N V R N SATISH
1

votes
0

answer
272

Views

Adding mcrypt to homestead on windows

I am trying to open an old Laravel 4 project on my recently created vm using vagrant homestead. However when I visit the project url it says Mcrypt PHP extension required. After browsing around for a solution on how to enable mcrypt most sources are saying to run this command in homestead sudo apt-g...
xslibx
1

votes
2

answer
477

Views

Issue in installing Mcrypt extension in mac OS 10.13

I am trying to run codeigniter project on mac but it is showing 'The Encrypt library requires the Mcrypt extension.' error.I have tried many solutions to install Mcrypt extension but every time i am getting errors.I have tried to install it using homebrew using brew install php5-mcrypt command but g...
Yesha Doshi
1

votes
0

answer
210

Views

Install Mcrypt library to google cloud

I am using google cloud compute engine for hosting my site. I am using php 7.0.2 and codeigniter 3.1.7 and i am getting bellow error `The Encrypt library requires the Mcrypt extension.` To install Mcrypt library i used bellow code. sudo apt-get install mcrypt php7.0-mcrypt And then restarted the ins...
parth
1

votes
0

answer
62

Views

Convert VB.NET AES encoding to PHP using openssl_decrypt

Currently I'm working on integration of external service wrote in VB.NET. This service send me a string with some information encrypted with below function (this is a cut and past from the external service developer that send me the code) Public Function Decode(ByVal S As String, ByVal chiave As Str...
Marco
1

votes
1

answer
1.6k

Views

Call to undefined function mcrypt_module_open

I'm using magento, when I load the page I get the following error: ( ! ) Fatal error: Uncaught Error: Call to undefined function mcrypt_module_open() in /Users/my-pathlib/Varien/Crypt/Mcrypt.php on line 63 I'm using php7.1 and have installed mcrypt: sudo apt-get update sudo apt-get install mcrypt ph...
Jenssen
1

votes
2

answer
1.9k

Views

I want To Make mcrypt work on xampp windows with php 7.2 Error: Call to undefined function mcrypt_module_open()

For a testing purpose I want to get rid of this error ' Uncaught Error: Call to undefined function mcrypt_module_open() ' . I know its deprecated. Tried pasting the .dll file and addind this line in the php.ini (extension=php_mcrypt extension=libmcrypt) and no use .. Any Help ?
Essam Mahdy
1

votes
1

answer
359

Views

Replace Mcrypt Encription with OpenSSL Encription for OpenCart CMS

I have OpenCart 1.5.6.4 with encryption.php file in system library folder. The codes in encryption.php are : For migration from php 5.6 to php 7.2 , I need to replace Mcrypt Encription with OpenSSL Encription. I have replaced mcrypt_create_iv(32, MCRYPT_RAND) with openssl_random_pseudo_bytes(32, tru...
Pasakgroup
1

votes
0

answer
299

Views

Possible to install mcrypt in PHP 7.1 on Oracle Linux 7?

Is it possible to install mcrypt in PHP 7.1 running on Oracle Linux 7? This is not listed in the repo here. I thought that I might be able to install it using 'yum install epel-release' and 'yum -y install php-mcrypt', however the package is listed as unavailable: yum -y install php-mcrypt Loaded...
N__
1

votes
0

answer
224

Views

Sage Pay - downstream plugins flagged for PHP 7.1 critical error due to use of mcrypt

We use a booking plugin in our Wordpress site which uses Sage Pay libraries for the payment processing. Recently we were advised to upgrade to PHP version 7.1, however, when running a compatibility check, an mcrypt error was revealed: > The following plugins/themes are not compatible with PHP 7.1. B...
John Wells
1

votes
1

answer
593

Views

Can't get mcrypt to work on OS X High Sierra and PHP 7.1

I need to use a Wordpress 3rd party plugin that uses mcrypt. mcrypt is not available as default in my environment (OSX High Sierra and PHP 7.1) (and I know that it is deprecated...) so I installed it with PECL. The installed mcrypt.so file was created in this location: /usr/lib/php/extensions/no-deb...
Christer Fernstrom
1

votes
0

answer
40

Views

Class MCrypt AES/CBC/NoPadding from Java (Android) to Swift 4

I've got a class MCrypt in Java (in an android App), it's working well, but i need to translate it in Swift 4. Here my Class in Java public class MCrypt { private String SecretKey = '0pw3av67$979cdxf'; private Cipher cipher; private String iv = 'xe95bmad7x5432p8'; private IvParameterSpec ivspec = ne...
Fabien Maurice
1

votes
0

answer
23

Views

What is the best way to encrypt data without using the resource of mysql server ? Is mcrypt with CFB mode the best way with php?

I have a huge database with non encrypted fields. These data are sensitive and the managers took a decision to encrypt them as soon as we can. And all new data should be automatically encrypted to the same way. First Method: If I use aes_encrypt to create a new field and insert the encrypted data to...
am909090
1

votes
1

answer
2.8k

Views

mcrypt 2 way encryption issue with base64 encoding and serialization

UPDATE (SOLUTION) Since this post seems to get decent amount of attention, I'd like to let you know that the solution ended up being to provide a proper enctype (content type) parameter in the declaration. You must set the value to multipart/form-data to prevent encoding that would otherwise take p...
Corey Ballou
1

votes
2

answer
1.2k

Views

Is it possible to decrypt files encrypted with php mcrypt_encode with third party utilities?

I am inexperienced with symmetric encryption. I am encrypting a pdf file in php using the following code: $source_filepath = RB::get('docroot') . RB::get('baseUrl') . '/submissions/' . $this->_filename; $encrypted_filepath = $source_filepath . '.nc'; $pdf_data = file_get_contents($source_filepath);...
brandon
1

votes
2

answer
645

Views

PHP Compile Error trying to get mcrypt, Mac OSx 10.6

I and working on setting up a LAMP stack on a new Mac Mini to use as a web server. I am using the bundled PHP version 5.3.3 and Apache 2.2.15. I have gotten phpMyAdmin working and connect to my mysql installation but I get a 'Cannot load mcrypt extension. I did this tutorial - http://michaelgracie....
Patrick Arlt
1

votes
2

answer
3.4k

Views

Difference in PHP encryption from iOS and .NET

I have an issue when communicating encrypted between iOS and PHP. I have an app that encrypts a string and sends it to a PHP server that decrypts it. That part works just fine. Now the PHP server needs to send an encrypted response back to the app, which seems to be causing a bit more gray hair. Th...
mgj
1

votes
2

answer
721

Views

Decrypting Text Using AES in CBC Mode

I have this code $td = \mcrypt_module_open(\MCRYPT_RIJNDAEL_256, '', MCRYPT_MODE_CBC, ''); \mcrypt_generic_init($td, '12345678901234561234567890123456', '12345678901234567890123456789012'); echo mdecrypt_generic( $td, \mcrypt_generic($td, 'Testing') ); But the result is ˆ]Ië{ŒÕÌe}Q™‡ÿòø...
chris
1

votes
3

answer
2k

Views

Encrypting files with php/mcrypt is corrupting docx (and other Microsoft Office 2007) files but others are fine

I'm working with a CodeIgniter application to encrypt uploaded files then decrypt them when downloaded so they can be stored safely (alongside other security measures). This is all working fine, apart from docx (and other Microsoft Office 2007+) files. When these are downloaded they are successfully...
1

votes
1

answer
685

Views

mcrypt example not working

I am working on ubuntu in c++ code. I wanted to test an exmple with mcrypt from this link: http://linux.die.net/man/3/mcrypt , but whn i do: gcc test.c -o testt -lmcrypt there is no result back. why? Where am I wrong? For both examples the result is the same. appreciate!!
sunset
1

votes
2

answer
391

Views

If I use a nonce in the protocol, does the IV still need to be random?

I am creating a protocol which tries to 'store' symmetric key sessions for later. I store three things: the session_id (public), symmetric_key (private), and counter/nonce (private). With every transmission, the session_id is transmitted in the clear and used to lookup the symmetric_key. The symmetr...
chacham15
1

votes
1

answer
1.3k

Views

C Libmcrypt cannot encrypt/decrypt successfully

I am working with libmcrypt in c and attempting to implement a simple test of encryption and decryption using rijndael-256 as the algorithm of choice. I have mirrored this test implementation pretty closely to the man pages examples with rijndael as opposed to their chosen algorithms. When compiled...
majic bunnie
1

votes
1

answer
960

Views

install mcrypt for phpMyAdmin on Mac Lion with Xcode 4.3

I try to install phpMyAdmin on my Mac running Lion (10.7.3). It required mcrypt. I found the link: http://www.glenscott.co.uk/blog/2011/08/29/install-mcrypt-php-extension-on-mac-os-x-lion/ On my friend's Mac, the link is good. But on my Mac, it cannot run. I encounter the error from the statement of...
vietstone
1

votes
1

answer
1.9k

Views

Encrypt/Decrypt binary mp3 with mcrypt, missing mimetype

I have a script that read a mp3 file and encrypt it, I want to be able to decrypt this file and convert it to base64 so it can play in html5. Key 1 will be stored on the page and static, key2 will be unique for each file, for testing I used: $key1 = md5(time()); $key2 = md5($key1.time()); Here is my...
Jeremy Dicaire
1

votes
1

answer
739

Views

How is write PHP mcrypt_ecb decrypt in Ruby?

public static function decryptSessionByDES($str,$key_str){ $decoded =base64_decode($str); $iv = substr($key_str, 0, mcrypt_get_iv_size(MCRYPT_3DES,MCRYPT_MODE_ECB)); return trim(mcrypt_ecb(MCRYPT_3DES, $key_str, $decoded, MCRYPT_DECRYPT, $iv)); } How to covert this code in Ruby?
huacnlee
1

votes
2

answer
7.4k

Views

How To Enable Php Mcrypt on Mac Os X Lion 10.7.4

I have been trying to enable mcrypt for two days in OS X. I read lots of document but I could not accomplish. Maybe it is because I am new in OS X environment. The brief summary what I have done so far is; I installed Xcode and installed Command Line Tools. Downloaded and extracted libmcrypt-2.5.8 a...
udogan
1

votes
1

answer
750

Views

Install mCrypt on CENTOS 5.8 x86_64

Having some problems installing this and thought I'd post again. I try yum install php-mcrypt* or yum install php-mcrypt and it says no package available. I tried installing EPL with su -c 'rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm' and it said 'transfer...
user1446650
1

votes
1

answer
767

Views

Decrypting string using MCrypt and TripleDES

I have made this code to encrypt the data in a database(It was stored as plain text during to testing purposes): try { $link = new PDO('mysql:host=localhost;dbname=MAIN', 'USER', 'PASSWORD'); $stmt = $link->prepare('SELECT * FROM workers WHERE crypt = '0''); $stmt->execute(); $prepared = $stmt->fetc...
DaGhostman Dimitrov
1

votes
5

answer
235

Views

Using defined security variables inside a function

I found out that I should not use global variables like global $auth_key for sensitive data's (Correct me if that's not true.) so I wanted to use defined variables for storing security keys. Inside config.php salt keys are defined. define('AUTH_KEY','::~K~UC*[tlu4Eq/]Lm|h'); define('SECURE_AUTH_KEY'...
Ken
1

votes
1

answer
1.3k

Views

Output size of mcrypt_encrypt

I have a table with a field name. I want to store name-data as encrypted into the field. The name can be 128 characters. Then what should be the type of the field (eg: varchar(256) or text). The following function I am using for encryption/decryption.
Habeeb Perwad
1

votes
1

answer
475

Views

PHP mcrypt_decrypt randomly failing

I'm struggling with PHP's mcrypt functions. I've never used them before, and they are working fine on my testing server (WAMP PHP 5.4.3), but they fail randomly on the production server (LAMP PHP 5.2.17). When I run the decrypt function I get random (binary?) characters like so: n��/�=�C_�...
Dominic P
1

votes
1

answer
705

Views

PHP AES 256 encrypt weird characters

I have the following encrypt code: function encryptData($value){ $key = '7685647tfyr65413285746352413sgfh'; $text = $value; $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB); $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); $crypttext = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key,...
StealthRT
1

votes
1

answer
281

Views

Is libmcrypt not reliable?

A few days ago I put a question on SO, without any meaningful answer. Bellow is it on short: I have a client server program in C that encrypts/decrypts data with mcrypt C's library. The client encrypts the string that wants to send to server, send it, and after the server reads, decrypts it. Bellow...
artaxerxe
1

votes
1

answer
765

Views

How to compile mcrypt for OS X Mavericks 10.9

I'm having a heck of a time trying to compile mcrypt for OS X Mavericks. I need mcrypt for a website I'm helping develop. I installed Mavericks and then command-line tools for XCode using: xcode-select --install That ran an installer. Then I downloaded libmcrypt-2.5.8 and unzipped it. I navigate...
sehummel
1

votes
1

answer
1.1k

Views

Unable to install php-mcrypt

I have followed so many online guides now about install php-mcrypt but none of these seem to be playing ball i am getting a lot of dependency errors. All help would be greatly appreciated when doing a yum update after installing an rpm i get the following Loaded plugins: fastestmirror, security Loa...
user3283324
1

votes
1

answer
135

Views

Data chaos by multiple encrypt/decryption

I'm using PHP to write an application where the user can encrypt his text several times with several possible algorithms to use. At first i thought this was really simple, but then i thought of the problem that occurs, when data is padded to blocksize, encrypted and then decrypted. At first i though...
Sirac
1

votes
1

answer
285

Views

Laravel Is php-mcrypt necessary for https and Auth?

Everything is in the title : can I use https and the Auth:: class whithout having installed php mcrypt ? (I'm on a redhat enterprise linux 6.1 on architecture s390x, it's just impossible to find pre-compiled packages). If it's possible then I would just use Laravel whithout Mcrypt...
hilnius
1

votes
1

answer
419

Views

PHP MCrypt: Encrypt/Decrypt data by chunks. Why result depends on size of the chunk?

I want to encrypt/decrypt files by chunks, because file size can be quite large (50-100Mb). I found code of encryption class on stack overflow and changed it just a bit: class filecrypt{ var $_CHUNK_SIZE; var $_CHIPHER; var $_MODE; function __construct($chipher, $mode){ $this->_CHUNK_SIZE = 100*1024...
Tamara
1

votes
3

answer
225

Views

Reading data encrypted with PHP using Ruby

I'm in the process of replacing and old PHP system with a Ruby one. The developer here for me wrote his own encryption code (ugh). The old PHP uses the below code to encrypt some data. I'm having difficutly writing a 'decrypt' method in ruby. Preface I'm aware of security issues with this existing p...
Peter Fitz

View additional questions