Skip to content

Instantly share code, notes, and snippets.

@mcorkum
Created August 17, 2018 06:28
Show Gist options
  • Save mcorkum/91fb81b87cbe1cf533d6ff8b495727b5 to your computer and use it in GitHub Desktop.
Save mcorkum/91fb81b87cbe1cf533d6ff8b495727b5 to your computer and use it in GitHub Desktop.
$secret_iv = '3434977318554001';
$iv = substr( hash( 'sha256', $secret_iv ), 0, 16 );
$file_contents = get_file_contents( 'file_to_decrypt.aes' );
$output = openssl_decrypt( base64_decode( $file_contents ), 'AES128', $key, 0, $iv);
file_put_contents( 'file_to_decrypt.pdf' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment