Re: Encryption Code Problem
Re: Encryption Code Problem
- Subject: Re: Encryption Code Problem
- From: "Jonathan Fleming" <email@hidden>
- Date: Wed, 04 Jun 2003 01:34:07 +0100
From: Enrique Zamudio <email@hidden>
To: Jonathan Fleming <email@hidden>
CC: womnidev <email@hidden>
Subject: Re: Encryption Code Problem
Date: Tue, 03 Jun 2003 14:36:45 -0500
You shouldn't save the bytes of the hash you get directly as a string,
because it's really binary, that can be interpreted differently on each
database or OS (because of text encodings). the squares represent some
special (non-printable) character. the spaces represent those same
characters; it's just a matter of who is printing out the info.
Encode the hash bytes to hex or base-64 first, then save it as a CHAR(40)
or
CHAR(25), depending on the encoding you use (hex or base-64). that way you
get only printable characters, ASCII characters, so you won't have any
problems with different text encodings.
Ok eZL, this sound good and now that I have seen Jonathan's code I would
really like to compare his with your suggestion. If you don't mind at all
can you post a sample. I'm sure Jonathan would be interested too.
Thank you
Jonathan :^)
eZL
_________________________________________________________________
Find a cheaper internet access deal - choose one to suit you.
http://www.msn.co.uk/internetaccess
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.