encryption-symmetric

Simplest two-way encryption using PHP

谁说胖子不能爱 提交于 2019-11-26 00:07:45
问题 What is the simplest way of doing two way encryption in common PHP installs? I need to be able to encrypt data with a string key, and use the same key to decrypt on the other end. The security isn\'t as big of a concern as the portability of the code, so I\'d like to be able to keep things as simple as possible. Currently, I am using an RC4 implementation, but if I can find something natively supported I figure I can save a lot of unnecessary code. 回答1: Edited: You should really be using

How do you Encrypt and Decrypt a PHP String?

隐身守侯 提交于 2019-11-25 22:58:31
问题 What I mean is: Original String + Salt or Key --> Encrypted String Encrypted String + Salt or Key --> Decrypted (Original String) Maybe something like: \"hello world!\" + \"ABCD1234\" --> Encrypt --> \"2a2ffa8f13220befbe30819047e23b2c\" (may be, for e.g) \"2a2ffa8f13220befbe30819047e23b2c\" --> Decrypt with \"ABCD1234\" --> \"hello world!\" In PHP, how can you do this? Attempted to use Crypt_Blowfish , but it didn\'t work for me. 回答1: Before you do anything further, seek to understand the

How to encrypt/decrypt data in php?

醉酒当歌 提交于 2019-11-25 22:48:01
问题 I\'m currently a student and I\'m studying PHP, I\'m trying to make a simple encrypt/decrypt of data in PHP. I made some online research and some of them were quite confusing(at least for me). Here\'s what I\'m trying to do: I have a table consisting of these fields (UserID,Fname,Lname,Email,Password) What I want to have is have the all fields encrypted and then be decrypted(Is it possible to use sha256 for encryption/decryption, if not any encryption algorithm) Another thing I want to learn