mcrypt

Laravel requires the Mcrypt PHP extension. Not working for cron jobs

会有一股神秘感。 提交于 2019-12-14 04:07:32
问题 So I am plagued with this issue like many others have been but with no solution. The Issue : commands issued by a cron task do not run and give the message: Laravel requires the Mcrypt PHP extension. I can run commands through artisan and they work fine. I am using MAMP on OSX 10.8. I've quadrupal checked my .bash_profile to ensure the correct PATH is set which is: export PATH=/Applications/MAMP/bin/php/php5.4.4/bin:$PATH . Confirmed by which php in terminal. php -v confirms PHP 5.4.4 is

writing php MCrypt twofish for c# bouncycastle

给你一囗甜甜゛ 提交于 2019-12-13 22:05:07
问题 I'm learning how to use the BouncyCastle c# cipher library for doing encryption. I'm not looking to send messages so I'm not thinking about security etc. I have written my c# code in Visual Studio. Here is the problem. I have encrypted the text " Hello World! ", using Twofish in CFB mode. The key is 1234567812345678. I've used phpfiddle http://phpfiddle.org/ online tool. $algo = 'twofish'; $mode = 'cfb'; $cipher = mcrypt_module_open($algo,'',$mode,''); $key = hex2bin(

mcrypt performance

北城余情 提交于 2019-12-13 13:02:40
问题 I am encrypting some data and obtaining vastly differing results in srcipt running time between systems. Running my algorithm on a win7 machine the encryption completes in 3-8 thousands of a second. Same code on linux (ubuntu11 and debian6 boxes) takes between 7 and 35 SECONDS. This is not really acceptable for my needs and was wondering if any kind person could shed any light. Relevant code below: <?php class MyEncryption { public function __construct( $keyData ) { $this->_encryptInit(

authToken encryption with urlencoding/urldecoding and .htaccess issue

白昼怎懂夜的黑 提交于 2019-12-13 06:05:30
问题 how to generate tokens when you have encryption with url encoding/urldecoding and .htaccess file involved. I've a .htaccess enabled as well and it ran into a problem of javascript/php communication mentioned on this url. http://www.tequilafish.com/2007/12/06/mod_rewrite-php-how-to-match-urlencoded-plus-sign/ as per the suggestion by the post, I can't urlencode twice, as frontend system is not under my control, RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME

Encryption using mcrypt, PHP, and MySQL

↘锁芯ラ 提交于 2019-12-13 05:41:51
问题 I am trying to use mcrypt to store a password on my database. First of all, it WORKS, but only some of the time. Here is my encryption code: //Encryption/Decryption key $key = $username.$username.$username.$username.$username; //Encryption Algorithm $cipher_alg = MCRYPT_RIJNDAEL_256; $iv = mcrypt_create_iv(mcrypt_get_iv_size($cipher_alg, MCRYPT_MODE_ECB), MCRYPT_RAND); $password = mcrypt_encrypt($cipher_alg, $key, $pass1, MCRYPT_MODE_CBC, $iv); This then uploads the $username, the $iv and the

PHP CRYPT_BLOWFISH Error?

五迷三道 提交于 2019-12-13 04:29:08
问题 I'm on Redhat and using PHP Crypt_Blowfish and having following error. ERROR: Notice: Constant CRYPT_BLOWFISH_AUTO already defined in /usr/share/pear/Crypt/Blowfish.php on line 33 Notice: Constant CRYPT_BLOWFISH_MCRYPT already defined in /usr/share/pear/Crypt/Blowfish.php on line 38 Notice: Constant CRYPT_BLOWFISH_PHP already defined in /usr/share/pear/Crypt/Blowfish.php on line 43 Fatal error: Cannot redeclare class Crypt_Blowfish in /usr/share/pear/Crypt/Blowfish.php on line 88 My code is

Transfering encrypted data server to server, between 2 PHP scripts

白昼怎懂夜的黑 提交于 2019-12-13 03:15:23
问题 I need to transfer data from a PHP script on my local server to a remote API (also written in PHP) on my hosting server. It is basically a primitive version control system, and I use both HTTP GET and HTTP POST to transfer files and strings. I would like the connection encrypted, but my (shared) web host tells me I can't use SSL because I can't get a dedicated IP address--and even if I could, I don't want to spend any more money on it. My question is: Is there a better way to do this? Some

Replace deprecated mcrypt_cbc with mcrypt_encrypt

时光总嘲笑我的痴心妄想 提交于 2019-12-13 02:18:54
问题 I have an old algorithm to encode passwords which I want to use with PHP 7 public function encriptarPass($cadena) { $extra = (strlen($cadena)%8); for ($i = $extra; $i < 8; $i++) { $cadena .= chr(8-$extra); } $key = "stack"; $iv = "stack"; return strtoupper(bin2hex(mcrypt_cbc(MCRYPT_3DES, $key, $cadena, MCRYPT_ENCRYPT, $iv))); } I tried to replace mcrypt_cbc with mcrypt_encrypt and I get this error: mcrypt_encrypt(): Module initialization failed I want to update the algorithm to work with old

Laravel: Lacking mcrypt extension only when using phpunit

微笑、不失礼 提交于 2019-12-12 23:01:54
问题 I have a following problem - when using phpunit in my Laravel 4 installation folder I get a following error: Laravel requires the Mcrypt PHP extension. However it does not appear when I'm using the artisan command. I know that the issue must be caused by phpunit loading another php.ini than the one set in my zshconfig. Unfortunately I don't know how to force phpunit to use the correct one. My .zshconfig looks like this: # Customize to your needs... export PATH=:/Applications/MAMP/Library/bin/

Mcrypt problems after update OS X to El Capitan

放肆的年华 提交于 2019-12-12 13:00:24
问题 I have a problem with mcrypt(and Laravel) after update Yosemite to El Capitan. When i run local site(Laravel Framework version 4.2.17), i'm getting Mcrypt PHP extension required. Here are my settings: 1) which php /usr/local/bin/php 2) php --version PHP 5.6.14 (cli) (built: Oct 3 2015 14:54:13) Copyright (c) 1997-2015 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies with Xdebug v2.3.3, Copyright (c) 2002-2015, by Derick Rethans 3) php --ini Configuration File (php