Skip to content

Tag: encryption

How to encrypt XOR hex string 32 in PHP

I’m trying to encrypt some of my passwords using the XOR encryption algorithm. I tested it on CyberChef but I don’t know how to convert it from PHP. I look forward to helping. Thanks a lot. XOR HEX string 32 Answer It helps to start with the basic data structures involved. Your objective is to use…

How to decode a string in base64 with php

Hello i’m trying to decrypt a base64 string with php and i can’t figure it out. I am able to decrypt it with JavaScript using CryptoJS with the code below What is the equivalent of this code in PHP? Answer To decode and decode from base64 a string can use base64_encode() : and now to decode: Now c…

how to descrypt an aes encryption from flutter in php

In my flutter app am using an encryption package called encrypt . and am able to encrypt my chat messages using this code but the problem is that the encrypted part will be stored in mysql database and flutter local database (sqflite) too and when i want to build a website for the app using php mysql html css…

Check with PHP if a file is encrypted

I have a form that uploads a file via PHP to my server. For security I analyze these files with ClamAV, however, encrypted files (eg.: zip with password, pdf with password) cannot be analyzed. I tried via fopen to see if there was any error reading the file, but it reads the file normally, displaying the encr…

C# RSA Encrpytion -> Laravel phpseclib decrypt()

I’m using a key pair generated by phpseclib and then I use it to encrypt in C# a message and decrypt in PHP. The public key is: The conversion to XML is done via https://superdry.apphb.com/tools/online-rsa-key-converter Here is how the message is encrypted in C#: What is sent (encrypted message) by C# t…

Decrypt aes-256-cbc encoded file with iv = 0

I have an input.DAT file that is encrypted with aes-256-cbd method. I want to decrypt the file using php. When I execute the following command from command line, the file is decrypted successfully. But when I try to use php for decrypting the file using the method openssl_decrypt($data, AES_256_CBC, $encrypti…