how do I decipher using this?

2001-02-05 Thread Lee Melville

Hi,

I am enciphering a series of files and am trying to decipher them with this
routine, it is basically the same as the one I have used for enciphering.
It has however been a while since I have done this and I am now having
trouble trying to remember how it is done.  Can anyone help with this.

thanx
lee

--- code follows --

 filesLeft=0;
 while(filesLeft(mObjects-numFiles)){
  sourceFile=mObjects-files[filesLeft];
  destFile=sourceFile;
  destFile.Replace(".enc",".zip");

  fileIn.Open(sourceFile, CFile::typeBinary | CFile::modeRead, NULL);
  fileOut.Open(destFile, CFile::typeBinary | CFile::modeCreate |
CFile::modeWrite, NULL);

  RAND_pseudo_bytes(salt,PKCS5_SALT_LEN);
  fileIn.Read("Salted__",strlen("Salted__"));
  fileIn.Read(salt,PKCS5_SALT_LEN);

   // seems to fail after here - am i using the salt correctly??
  ciph = EVP_des_ede3_cbc();
  EVP_BytesToKey(ciph,EVP_md5(),salt,(unsigned char
*)passwd,strlen(passwd),1,(unsigned char *)key,(unsigned char *)iv);
  EVP_CipherInit(ctx, ciph, (unsigned char *)key, (unsigned char
*)iv,0);

  i=1;
  while (i!=0){
   i=fileIn.Read(buff,512);
   EVP_CipherUpdate(ctx, out, outl, (unsigned char *)buff, i);
   fileOut.Write(out, outl);
  }
  EVP_CipherFinal(ctx, out, outl);
  fileOut.Write(out, outl);
  fileIn.Close();
  fileOut.Close();
  filesLeft++;
 }


- end of code -





__
OpenSSL Project http://www.openssl.org
User Support Mailing List[EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]



Re: Message status - undeliverable

2001-01-11 Thread Lee Melville

yup same here

- Original Message - 
From: "Jessie Holloway" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 11, 2001 8:52 PM
Subject: RE: Message status - undeliverable


 Why am I receving hundreds of e-mail from this site. Reference message
 below. How do I get
 my name off of this list!
 
 Thank You!
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 11, 2001 3:20 PM
 To: [EMAIL PROTECTED]
 Subject: Message status - undeliverable
 
 
 The message that you sent was undeliverable to the following:
 RShyamsundar
 __
 OpenSSL Project http://www.openssl.org
 User Support Mailing List[EMAIL PROTECTED]
 Automated List Manager   [EMAIL PROTECTED]
 

__
OpenSSL Project http://www.openssl.org
User Support Mailing List[EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]