Linked Questions
64 questions linked to/from How do you Encrypt and Decrypt a PHP String?
1 vote
3 answers
710 views
I want to scramble / unscramble a software license key into / from mysql database
I want to store software license keys in a field of my mysql db, but I want to have the license number stored in a scrambled format so that if the db is compromised the license keys won't be usable. ...
0 votes
1 answer
2k views
Encoding, Decoding by secret key
If I have this cookie: $my_cookie = "value"; And i would like to encode this value by secret key like this: $encode_cookie = encoding($my_cookie, "key"); setcookie('my_cookie',$encode_cookie); Then, ...
0 votes
3 answers
1k views
Inconsistent RSA signature across platforms
I'm creating a license key generator that RSA signs base64 encoded license key data and appends signature to license data.On the end user side signature is verified using the public key that is ...
0 votes
1 answer
1k views
AES encrypt in Terminal and decrypt in PHP
I have come accross other threads with similar questions but due to recent changes in PHP (ie. mcrypt removal), I am seeking some advice as to how I'd best go about this using OpenSSL in 2017/18. ...
0 votes
2 answers
2k views
How to use bcrypt in mysql with php
I want to encrypt/secure my phoneNumber column in MySQL so for this purpose I used bcrypt but unable to decrypt this Here is my code $password="abcd"; echo $pwd=password_hash($password, ...
1 vote
1 answer
1k views
PHP - cookie encryption and hmac signing
I was just wondering is it redundant to encrypt and sign a cookie? Isn't encryption enough? Why or why not? If it's not redundant, I'm wondering if I'm going about this in the right direction. For ...
-2 votes
2 answers
1k views
Encrypt / decrypt functions that work on Delphi and PHP
Due to GDPR I'm trying to find a good method to encrypt/decrypt data. But as my application has both Delphi and PHP endpoints I need functions that have strong encryption and work on both. Searching ...
-1 votes
1 answer
1k views
How to verify that the decryption result is correct?
I've been playing around with php mcrypt over the weekend with AES used to encrypt text strings with a key. Later I worked up a tiny php tool to encrypt / decrypt your strings with AES/mcrypt now ...
0 votes
1 answer
899 views
Encrypt / Decrypt Text using PHP - 16 characters or shorter
I'd like to store user id's in google analytics however since they have a policy of not allowing this, I want to encrypt some text in php and be able to decrypt when needed(The User Id). The catch ...
1 vote
1 answer
837 views
Encrypting in VB.Net and Decrypting in PHP
I am working on creating an PHP String decrypter for a program that is written in VB.Net. I have done some research on .NET to PHP Encryption and Decryption and I can't seem to find a definitive ...
1 vote
1 answer
1k views
php - Encryption/decryption of strings and files using mcrypt
From time to time I come around the task of creating functions for encrypting/decrypting strings and files in PHP. I decided to finally nail those functions and did some searching but I couldn't find ...
0 votes
1 answer
747 views
mcrypt_decrypt not working when used in other php file
I am creating login where registered user can Login with there Emailid and password(use Lampp). I have one form where user are registering with there information that is User Name, EmailID, password ...
0 votes
2 answers
357 views
QR Code vs 1D Barcode security
I need to make a ticketing system for a local promoter. I have most of the work done for the barcode but this is pretty old. I want to upgrade to use QR code. The security issue i have is when ...
-1 votes
1 answer
547 views
Error during encrypt a file using Mcrypt DES in php
i want to encrypt a text file. below is my code.But i am getting function error during run. <?php $key = '123456'; $plain_text = pkcs5_pad(file_get_contents('yourFile.txt')); /* Open module, ...
0 votes
1 answer
281 views
PHP string encryption/decryption, am i doing it wrong?
Hey I really need some guidance. ATM. i am using this encryption/decryption method for regular strings. function encrypt($pure_string) { $iv_size = mcrypt_get_iv_size(MCRYPT_BLOWFISH, ...