mcrypt

yum安装php7

巧了我就是萌 提交于 2019-11-30 17:54:40
yum安装php7 yum -y install php70w-devel php70w.x86_64 php70w-cli.x86_64 php70w-common.x86_64 php70w-gd.x86_64 php70w-ldap.x86_64 php70w-mbstring.x86_64 php70w-mcrypt.x86_64 php70w-pdo.x86_64 php70w-mysqlnd php70w-fpm php70w-opcache php70w-pecl-redis php70w-pecl-mongo 来源: https://my.oschina.net/zfblog/blog/3114171

Decrypting the .ASPXAUTH Cookie WITH protection=validation

本小妞迷上赌 提交于 2019-11-30 17:50:48
For quite sometime I've been trying to decipher the ASP .ASPXAUTH cookie and decrypt it using PHP. My reasons are huge and I need to do this, there is no alternative. In PHP so far I have successfully managed to read the data from this cookie, but I cannot seem to do it while it is encrypted. Anyway, here it goes... First you need to alter your servers Web.config file (protection needs to be set to Validation): <authentication mode="None"> <forms name=".ASPXAUTH" protection="Validation" cookieless="UseCookies" timeout="10080" enableCrossAppRedirects="true"/> </authentication> Then in a PHP

proper PHP mcrypt encryption methods?

社会主义新天地 提交于 2019-11-30 15:45:47
问题 Ok, I have tried to create my own encryption/decryption methods using PHP mcrypt , and when I posted them a while back some called them "trash". They were mentioning things about "Initialization Vectors" and such. Basically, how can I make these cryptography methods better: function encrypt($key, $data){ $encrypted_data = mcrypt_cbc(MCRYPT_RIJNDAEL_192, $key, $data, MCRYPT_ENCRYPT); return base64_encode($encrypted_data); } function decrypt($key, $encryptedData){ $dec = base64_decode(

proper PHP mcrypt encryption methods?

做~自己de王妃 提交于 2019-11-30 14:56:22
Ok, I have tried to create my own encryption/decryption methods using PHP mcrypt , and when I posted them a while back some called them "trash". They were mentioning things about "Initialization Vectors" and such. Basically, how can I make these cryptography methods better: function encrypt($key, $data){ $encrypted_data = mcrypt_cbc(MCRYPT_RIJNDAEL_192, $key, $data, MCRYPT_ENCRYPT); return base64_encode($encrypted_data); } function decrypt($key, $encryptedData){ $dec = base64_decode($encryptedData); $decrypt = mcrypt_cbc(MCRYPT_RIJNDAEL_192, $key, $dec, MCRYPT_DECRYPT); return trim($decrypt);

can't find mcrypt => Call to undefined function Laravel\mcrypt_create_iv()

狂风中的少年 提交于 2019-11-30 12:58:47
问题 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 Lion with macs native web server. 回答1: You need to enable it in your php.ini file as well and probably restart Apache. In php.ini you will find ;mcrypt.so and remove the ; from it. Or, if it's not in there, just add mcrypt.so somewhere. Also the salt

phpMyAdmin mcrypt error on PHP7.1

白昼怎懂夜的黑 提交于 2019-11-30 09:57:00
问题 Apache/2.4.23 (Win64) PHP/7.1.0 PhpMyAdmin: 4.6.5.2 Error Image: Any idea? 回答1: This was a problem regarding compatibility with such a new PHP version, technically with the library function that phpMyAdmin uses for various encryption functions. The problem was fixed in phpMyAdmin and will be part of the next release (which will be phpMyAdmin 4.6.6) 回答2: Just to add to Alex's answer, the code has a typo which makes it invalid, it should look like this: public function handleError($errno,

PHP Mcrypt, how secure is it really? [closed]

别等时光非礼了梦想. 提交于 2019-11-30 09:30:15
At the moment I am working on a project that will handle some quite sensitive personal information, although it are not backaccount numbers it is still sensitive personal information and I want to do everything I can do to encrypt and store this information inside a mysql as safely as possible. So now I am intensely looking for some security measures that could deal with this sensitive information. One easy way I found to encrypt/decrypt strings and text blocks, would be using mcrypt. But when I search on mcrypt over here on stackoverflow, I noticed that many people tell that mcrypt is

Mcrypt and base64 with PHP and c#

混江龙づ霸主 提交于 2019-11-30 09:28:20
I have written the same methods in two platforms which I believe should result same thing but its not happening. I have encrypted the same text with same key which result different. Can someone figure it out why is it happening ? String: this is test Key: 1234567812345678 PHP encrypted string: ybUaKwQlRNwOjJhxLWtLYQ== C# encrypted string: r2YjEFPyDDacnPmDFcGTLA== C# functions static string Encrypt(string plainText, string key) { string cipherText; var rijndael = new RijndaelManaged() { Key = Encoding.UTF8.GetBytes(key), Mode = CipherMode.ECB, BlockSize = 128, }; ICryptoTransform encryptor =

how to sync encryption between delphi and php using dcpcrypt

独自空忆成欢 提交于 2019-11-30 07:45:51
I'm using Delphi 2009 and most of the answers I've seen here are for 2010+ I am trying to sync encryption (delphi) to decryption (php) and failing. generate the encrypted string in delphi: program Project4; {$APPTYPE CONSOLE} uses SysUtils, DCPcrypt2, DCPsha1, DCPblockciphers, DCPdes, EncdDecd; var des: tdcp_des; enc,dec: ansistring; begin try des:=tdcp_des.Create(nil); des.InitStr('test', tdcp_sha1); enc:=encodestring(des.EncryptString('this is a test')); des.Free; des:=tdcp_des.Create(nil); des.InitStr('test', tdcp_sha1); dec:=des.DecryptString(decodestring(enc)); des.Free; writeln(enc);

can't find mcrypt => Call to undefined function Laravel\\mcrypt_create_iv()

大城市里の小女人 提交于 2019-11-30 04:39:47
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 Lion with macs native web server. Deinumite You need to enable it in your php.ini file as well and probably restart Apache. In php.ini you will find ;mcrypt.so and remove the ; from it. Or, if it's not in there, just add mcrypt.so somewhere. Also the salt option has been deprecated as of PHP 7.0.0. It is now preferred to simply use the salt that is