--0-1245441950-1206524662=:81443
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Hello,

I need to encrypt a password with a DES key, I'm trying the following code:
char * buff[20];
int theDESCheckResult;
DES_cblock * theDESKey1;
DES_key_schedule *theSchedule;
DES_cblock * theOutput;

ALMLog (@"Enter your DBPassword");
fgets((char *)&buff, 10, stdin);

theDESKey1 = [[[NSProcessInfo processInfo] globallyUniqueString] UTF8String];
RAND_seed(theDESKey1, strlen(theDESKey1));

theDESCheckResult = DES_set_key_checked(theDESKey1, theSchedule);
DES_ecb_encrypt(buff, theOutput, theSchedule, DES_ENCRYPT);

The DES key is correctly generated but the DES_set_key_checked () function returns -1 which means that the parity is wrong and the function DES_ecb_encrypt () cannot be executed.

Bests Regards
Driss


---------------------------------
Envoyé avec Yahoo! Mail.
Capacité de stockage illimitée pour vos emails.
--0-1245441950-1206524662=:81443
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Hello,

I need to encrypt a password with a DES key, I'm trying the following code:
    char * buff[20];
    int theDESCheckResult;
    DES_cblock * theDESKey1;
    DES_key_schedule *theSchedule;
    DES_cblock * theOutput;

    ALMLog (@"Enter your DBPassword");
    fgets((char *)&buff, 10, stdin);
 
        theDESKey1 = [[[NSProcessInfo processInfo] globallyUniqueString] UTF8String];
        RAND_seed(theDESKey1, strlen(theDESKey1));

    theDESCheckResult = DES_set_key_checked(theDESKey1, theSchedule);
    DES_ecb_encrypt(buff, theOutput, theSchedule, DES_ENCRYPT);>>

The DES key is correctly
generated but the DES_set_key_checked () function returns -1 which means that the parity is wrong and the function DES_ecb_encrypt () cannot be executed.

Bests Regards
Driss







Envoyé avec Yahoo! Mail.
Capacité de stockage illimitée pour vos emails.
--0-1245441950-1206524662=:81443--
__________________________________________________ ____________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager majordomo@openssl.org