0

guys! I'm trying to decrypt push message from my own push server. So, i know public key and auth secret parameters. I got encoded request payload in file, and trying to decode it:

$ciphertext = trim(file_get_contents("logs.txt"));
$publicKey = 'BCRH4G40osTxiez_SYLjB4Le93n.....';
$authToken ='J4E5Haf6yi0FZ......';
echo openssl_decrypt($ciphertext, "aes-128-gcm",$publicKey, 0, $authToken);
Matthew
  • 24,703
  • 9
  • 76
  • 110
Jdoe
  • 1
  • 1
    Not answering the specific question in any way, but do you need to do the encryption yourself, or can you just ensure you're using SSL and let the transport manage security of your messages? – Matthew Nov 09 '18 at 18:33
  • What is your "own push server"? How is the encrypted message generated? It might not be possible to decrypt an encrypted message with the public key, you need the private key for that. But that depends on the encryption algorithm. – Progman Nov 09 '18 at 19:20

0 Answers0