discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re[2]: How to do basic user/pass storage..


From: Manuel Guesdon
Subject: Re[2]: How to do basic user/pass storage..
Date: Wed, 28 Jan 2004 13:40:00 +0100 (CET)

Hi,

On Wed, 28 Jan 2004 10:40:36 +0100 David Ayers <address@hidden> wrote:
 >| Encryption is out of scope for the -base library, but you could have a 
 >| look at the dev-libs/gscrypt library.  I'm not sure whether it's in 
 >| production use and how the API really works.

Hash API is defined in  GSCryptBase.h (see GSHashObject class)

        example:
          NSString* hashedPassword=nil;
          NSData* md5Sum=nil;
          md5Sum=[GSMD5 digestOfString:password
                        usingEncoding:NSASCIIStringEncoding];
          hashedPassword=DataToHexString(md5Sum);

RC4 example: 
        GSRC4* myRC4=[GSRC4 rc4WithKey:myKey]; // myKey is a NSData
        NSData* encrypteddata=[myRC4 crypt:myData]; //myData is a NSData

        ti decrypt:
        GSRC4* myRC4=[GSRC4 rc4WithKey:myKey]; // myKey is a NSData
        NSData* data=[myRC4 decrypt:encryptedData]; //encryptedData is a NSData


Manuel

-- 
______________________________________________________________________
Manuel Guesdon - ORANGE CONCEPT <address@hidden>
14 rue Jean-Baptiste Clement  -  93200 Saint-Denis  -  France
Tel: +33 1 4940 0997  -  Fax: +33 1 4940 0998





reply via email to

[Prev in Thread] Current Thread [Next in Thread]