Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Credentials & Tidal
23-06-2015, 12:44 PM
Post: #12
RE: Credentials & Tidal
(22-06-2015 10:09 PM)Josef Wrote:  Thanks again for really fast response Smile

Link is either messed up or somehow modified by forum software - just remove ')' at end and it should work, no problem Smile Like this:

http://travistidwell.com/jsencrypt/demo/
(there should not be ')' at end!)

But anyway, if I get you correctly it's really about CR/LF codes that somehow got lost and messed up the key?
That plus the lines before/after the key. You have to include the lines starting '----'

(22-06-2015 10:09 PM)Josef Wrote:  That's great to hear! How do you copy/paste such a key?
I wouldn't have thought copy/paste would be required for production code. That implies to me that you're planning on using a single key for all your users. That isn't secure - anyone who finds the key for one of your users would then have access to private data from all users.

It would be better if you generated a key programmatically at runtime instead. The code I posted previously will do this. There are plenty of other security libraries around if you prefer something other than openssl.

If you aren't too worried about security and really want to use a single key, you'd specify it as a string using something like

Code:
const char* key =
    "-----BEGIN PUBLIC KEY-----\n"
    "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzLy7SjHUkpnZtZ5mFJZ0\n"
    "EXyiUpPaPOU4Q9tLa9odE7dqsOeEDY6nam/CKZRuSX1TL8wZx2+0BzcfYHiidXPi\n"
    "oSsKI5j5QPwfDdcyw+FaRh4AybxrzLEnaKLJkeVnykkAxZU8b4LyypZijD+wl7Vf\n"
    "1skB8mAfYJBJCb/3k33bBRiZ8XzIeUyLV3L9Znrv3bvS/Nerqf3TVXDmH+e0qADw\n"
    "kI4HAsSv9wX4kThoTpWcYxrz4ox2LJD6jFN2hlp+8JA58cISvji8E+xs0D95dZUK\n"
    "gSmvRrzrSiK6LkfNgjR1Rz0b+uww1P9AcjUfIFWs75qxAI/kr5f05IhgoNfwRmRC\n"
    "nQIDAQAB\n"
    "-----END PUBLIC KEY-----";
Find all posts by this user


Messages In This Thread
Credentials & Tidal - Josef - 22-06-2015, 12:05 PM
RE: Credentials & Tidal - simonc - 22-06-2015, 12:24 PM
RE: Credentials & Tidal - Josef - 22-06-2015, 12:42 PM
RE: Credentials & Tidal - simonc - 22-06-2015, 02:16 PM
RE: Credentials & Tidal - Josef - 22-06-2015, 02:47 PM
RE: Credentials & Tidal - simonc - 22-06-2015, 03:36 PM
RE: Credentials & Tidal - Josef - 22-06-2015, 04:05 PM
RE: Credentials & Tidal - simonc - 22-06-2015, 07:15 PM
RE: Credentials & Tidal - Josef - 22-06-2015, 08:00 PM
RE: Credentials & Tidal - simonc - 22-06-2015, 09:11 PM
RE: Credentials & Tidal - Josef - 22-06-2015, 10:09 PM
RE: Credentials & Tidal - simonc - 23-06-2015 12:44 PM
RE: Credentials & Tidal - Josef - 23-06-2015, 01:56 PM
RE: Credentials & Tidal - simonc - 23-06-2015, 01:59 PM
RE: Credentials & Tidal - Josef - 23-06-2015, 02:06 PM
RE: Credentials & Tidal - simonc - 23-06-2015, 02:52 PM
RE: Credentials & Tidal - Josef - 23-06-2015, 04:46 PM

Forum Jump: