Skip to content
Advertisement

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 a secret key to

Convert php decryption function to C# responds differently result

I created a service that encrypts and stores keys using PHP. The Service returns an encrypted response to the client. The client program will need to decrypt the encrypted data. But the decrypt function I wrote in PHP responds differently in C#. So my php Function: It returns: Now I have converted the above function to C #. The result

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 can apply this

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 javascript.

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 encrypted content without triggering

PHP OpenSSL encrypt with DES-ECB algorithm unexpected output

I’ve tried to encrypt the value with DES-ECB via PHP 7.4 (Laravel) and OpenSSL, and I try the online tool https://emvlab.org/descalc/ to encrypt value, the result was the expected. key: 96187BBAB2BD19ACF899B74FB4E37972 Input Data: F01DCCE40F8C365ADE0A7DC03BC11DDE The encrypted data is 355A627E977D8ECF4953C98D801E472F on online tool. https://emvlab.org/descalc/?key=96187BBAB2BD19ACF899B74FB4E37972&iv=0000000000000000&input=f01dcce40f8c365ade0a7dc03bc11dde&mode=ecb&action=Encrypt&output=D5131A2B35766D371420F679F15969FF When the next code written in PHP I can’t replicate the result: Is there a way to

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# to PHP (changes everytime): On the decryption side in

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, $encryption_key, 0, 0); it gives me this error: openssl_decrypt(): IV passed

Advertisement