Skip to content

Instantly share code, notes, and snippets.

@robertogallea
Created May 8, 2020 08:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robertogallea/d57c9af2720898224439062fdc088341 to your computer and use it in GitHub Desktop.
Save robertogallea/d57c9af2720898224439062fdc088341 to your computer and use it in GitHub Desktop.
// swapping the iv and try to decipher
try {
$tampered = $decodedEncrypted;
$tampered['iv'] = $decodedEncrypted2['iv'];
$encrypter->decrypt(base64_encode(json_encode($tampered)));
} catch (\Illuminate\Contracts\Encryption\DecryptException $exception) {
dump($exception->getMessage());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment