Jump to content

rchamberlin

New Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by rchamberlin

  1. Thanks, I actually forgot to take that out before I posted. I threw it in there as a last ditch attempt to get it working before I went to the message boards. Taking it out has not affect on the result. I appreciate the response!
  2. I need to send a password that's RSA encrypted with a public key (along with some other data). Here are the exact instructions from the documentation for the password: Encode password in Base64 and ensure UTF-8 encoding Encrypt password with RSA with provided public key, no block mode, and PKCS1Padding Encode resulting encryption in Base64 with ensured UTF-8 encoding Here's the code I'm using that to me seems correct: function encryptPassword($pass) { $pass = base64_encode($pass); $fp = fopen("./cert.crt", "r"); $publicKey = fread($fp, 8192); fclose($fp); openssl_get_publickey($publicKey); openssl_public_encrypt($pass, $cryptedText, $publicKey, OPENSSL_PKCS1_PADDING); return base64_encode(utf8_encode($cryptedText)); } I'm getting an error on the other side saying the password can't be decoded. Support from them is basically non-existent other than the error message, and them saying everything is correct on their side. My question is, am I sending what they're asking for according to the documentation? Thanks in advance!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.