Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><b>Revised answer</b>.<br> You want code to encrypt and decrypt a file that can be used with your C++ code.<br> It would be absolutely incorrect to write your own code (<a href="http://www.dreamincode.net/code/snippet76.htm" rel="nofollow noreferrer">like this one</a>). </p> <p>But, you say that you cannot use standard libraries.<br> Standard (and, maybe opensource) libraries are probably the most correct approach to implementing encryption in your applications. If you choose to not do that, it leaves you with only two options,</p> <ul> <li>Implement your own version of a standard encryption algorithm (and risk weakness by any errors you make)</li> <li>Use a 'system' call from your application and run a standard encryption (like <a href="http://bcrypt.sourceforge.net/" rel="nofollow noreferrer">bcrypt</a>) that maybe (hopefully) available on your system.</li> </ul> <p>I would still stick to picking up a standard library or integrating such an opensource code into my application. Please explain what prevents you from doing that.</p> <hr> <p><b>Old</b>: for some reason, i thought a PHP code was required... my error.<br> This article gives <a href="http://www.cyberciti.biz/faq/howto-stored-encrypted-password-in-php/" rel="nofollow noreferrer">a PHP encryption symmetric program example using crypt</a> to store password in a text file.</p> <p>Possibly related Stackoverflow questions</p> <ul> <li><a href="https://stackoverflow.com/questions/180870/what-is-the-best-encryption-library-in-c-c">discussion on the best C/C++ encryption library</a>.</li> <li><a href="https://stackoverflow.com/questions/568657/is-it-ever-ok-to-store-password-in-plain-text-in-a-php-variable-or-php-constant">discussion on plain text storage of password</a>.</li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload