About   |   Getting Started   |   Downloads   |   Documentation   |   Forum


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
AES encryption
08-03-2016, 06:04 PM
Post: #1
AES encryption
I'm at that point in some of my plugins where I need to add the registration functions to authorize them online (except, of course, for the free ones). I've never used AES before but I understand the public and private key concept. Testing the hdi::core::crypt and ::crypt::aes functions in CORE have, however, been quite humbling. I'd be really grateful if someone could provide some sample code to get me started in the right direction for encrypting and decrypting AES. I presume this can be done on a variety of data types such as a struct or JSON file. Any other general registration-related tips would be most welcomed as well.

Many thanks in advance! Undecided
Find all posts by this user
Quote this message in a reply
08-04-2016, 01:48 PM
Post: #2
RE: AES encryption
(08-03-2016 06:04 PM)Rick Johnson Wrote:  I'm at that point in some of my plugins where I need to add the registration functions to authorize them online (except, of course, for the free ones). I've never used AES before but I understand the public and private key concept.

Actually AES is symmetric key crypto, whereas RSA is asymmetric. With AES the same key is used to encrypt and decrypt, but with RSA one is used to encrypt but the other is used to decrypt.

(08-03-2016 06:04 PM)Rick Johnson Wrote:  Testing the hdi::core::crypt and ::crypt::aes functions in CORE have, however, been quite humbling. I'd be really grateful if someone could provide some sample code to get me started in the right direction for encrypting and decrypting AES. I presume this can be done on a variety of data types such as a struct or JSON file. Any other general registration-related tips would be most welcomed as well.

Our crypto classes will encrypt any data you provide to them in a std::string container. However, the hdi::core::Registration class already handles encryption of the file on disk, you just have to provide the key to it. Store the key somewhere in your source code (hardcoded) or derive the key from some consistent runtime information (like machine UUID) and pass it to the Registration::load() method.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)