Encrypting a file using openssl with a password in C?

Openssl contains lots of routines for many different crypto systems, including DES. The function you want is probably DES_ncbc_encrypt or one of the other variants, all of which are described on the des(3) man page.

If you are on a Linux System, you can use the crypt function. S prototype is : #include char * crypt(const char *key, const char *salt); Here is his desription (man 3 crypt) : The crypt() function performs password encryption, based on the NBS Data Encryption Standard (DES). Additional code has been added to deter key search attempts.

The first argument to crypt() is a null-terminated string, typically a user's typed password. The second is in one of two forms: if it begins with an underscore (``_''), an extended format is used in interpreting both the key and the salt value, as outlined below.

2 The crypt function truncates passwords, only uses DES1 and outputs in a base64-like format, so that may not be what the poster wanted. – user611775 Feb 24 at 16:36 Sorry, I misunderstood the question. I did not see the tag openssl.

Should I delete my answer? – Dimitri Feb 26 at 7:45.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions