10000000 ) { throw new RuntimeException( 'Invalid PBKDF2 iteration count.' ); } /* * Decode all binary fields. */ $salt = base64_decode( (string)($payload['salt'] ?? ''), true ); $iv = base64_decode( (string)($payload['iv'] ?? ''), true ); $tag = base64_decode( (string)($payload['tag'] ?? ''), true ); $ciphertext = base64_decode( (string)($payload['data'] ?? ''), true ); if ( $salt === false || $iv === false || $tag === false || $ciphertext === false ) { throw new RuntimeException( 'Encrypted data is incomplete or corrupted.' ); } /* * Expected values from our encryption page. */ if (strlen($salt) !== 16) { throw new RuntimeException( 'Invalid encryption salt.' ); } if (strlen($iv) !== 12) { throw new RuntimeException( 'Invalid encryption IV.' ); } if (strlen($tag) !== 16) { throw new RuntimeException( 'Invalid authentication tag.' ); } /* * Derive exactly the same 256-bit key. */ $key = deriveKey( $password, $salt, $iterations ); /* * Decrypt and authenticate. */ $decrypted = openssl_decrypt( $ciphertext, 'aes-256-gcm', $key, OPENSSL_RAW_DATA, $iv, $tag, '' ); if ($decrypted === false) { throw new RuntimeException( 'Authentication failed.' ); } $result = $decrypted; } catch (Throwable $e) { $error = 'Unable to decrypt. Check the encrypted text and password.'; } } } ?> AES Decryption — iSocialize Tools
🔓 Cyber Security

AES Decryption

Decrypt text generated by the iSocialize Tools AES Encryption tool using the original password.



Decrypted text
AES-256-GCM

The password must be exactly the same password used when the text was encrypted. If the password or encrypted package has changed, authentication will fail.

🏢
Want this tool on your website?
White label — all 130+ tools, your brand, your domain. ₹15,000 once. No monthly fee. We set it up in one week.
Get white label → WhatsApp →