--0-1425815250-1206570168=:56061
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Hello Abderrahmane,

Thank you for your answer.

Best Regards

El hallabi-Kettani Abderrahmane a écrit : Hello Driss,
I think, it will be

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

Namely that DES_ecb_encrypt is described like that :

void DES_ecb_encrypt(const_DES_cblock *input, DES_cblock *output,
DES_key_schedule *ks, int enc)

See opennssl/crypto/des/ecb_enc.c

Abderrahmane,


EL HACHIMI Driss a écrit :
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.



---------------------------------
Envoyé avec Yahoo! Mail.
Capacité de stockage illimitée pour vos emails.


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

Hello Abderrahmane,

Thank you for your answer.

Best Regards

El hallabi-Kettani Abderrahmane <abderrahmane_kettani@yahoo.fr> a écrit :
Hello Driss,
I think, it will be
 
    theDESCheckResult = DES_set_key_checked(&theDESKey1, &theSchedule);
    DES_ecb_encrypt((DES_cblock *) &buff, (DES_cblock *) &theOutput, &theSchedule, DES_ENCRYPT);>>
 
Namely that DES_ecb_encrypt is described like that :

 
void DES_ecb_encrypt(const_DES_cblock *input, DES_cblock *output,
       DES_key_schedule *ks, int enc)
 
See opennssl/crypto/des/ecb_enc.c
 
Abderrahmane,


EL HACHIMI Driss <elhachimi_driss@yahoo.fr> a écrit :
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.


Envoyé avec href="http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=52426/*http://fr.docs.yahoo.com/mail/overview/index.html">Yahoo! Mail.
Capacité de stockage illimitée pour vos emails.







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