Essentially what I'm attempting to do is within my cURL API I would like clients using the API to have specific sensitive data encrypted on their server, before it leaves their server, then decrypted on my server.
I saw that you can use the openssl_encrypt()
function, though I can't really find anything that's explaining it clear enough.
An example of the process is below:
ON THE CLIENT'S SERVER SIDE:
$dataToSend = 'mysupersecretstring';
// encrypt data
// connect and send to my server
ON MY SERVER'S SIDE:
$receivedString = '39bfy4f28d30g74fb34g79';
// string above is received
// string is decrypted decrypted
// $receivedString is now plaintext and can now be used on this server
I hope I'm explaining this clearly enough. If you have any questions please don't hesitate as it's rather important I have a valid solution to this.