Android Question Problem with decode RSA in PHP

Ilya G.

Active Member
Licensed User
Longtime User
Please help to solve problem with RSA. I'm always get response: Decryption failed

PHP: Copy
<?php
    $Private = file_get_contents("PrivateKey.pem");
    $messENC = base64_decode($_GET["mess"], true);

    if (openssl_private_decrypt($messENC, $messDEC, $Private)) {
        var_dump($messDEC);
    } else {
        var_dump("Decryption failed");
    }
?>
 

Attachments

sure you can use the base64 string to decrypt? Didn´t you need to first uudecode it?
 
Last edited:
Upvote 0
Back
Top