String encryption...

General issues with Borland Delphi

BrKoNjA
Can anyone recommend any unit/component for string encryption / decryption,
it doesn't have to be particulary fast or to encrypt files and so on...

Thanks,

Brko                                            
Dodgy
What level of protection do you require? Where will the encrypted
string be stored? If it's to be stored/used as a string (say in an ini
file) this will restrict the type of transformation you can apply to
it. Although even a simple rotating letter substitution would mangle
enough for most purposes.

Will you ever actually require the string again in it's original form?
If it's for user/password verification, a popular method is to
generate a hash from the username or password (or even both together),
then store this. Windows stores user password as hashes.

When someone comes to log in, you take the username and password they
entered, throw it into your hash routine, get the numeric result (the
hash) and compare this to your stored hash result.

Any of this any use?

Dodgy.
                                            
BrKoNjA
Thanks, that's the method I've been using for passwords, but I need to
generate encrypted string containing HDD serial number and software product
ID to send via internet where it would be decrypted, I've found that rc4
algorythm does the trick pretty nicely.

Best regards,

Brko
                                            
Paul
But why would you want to do this? You can pretty much guarantee that it 
will be broken and patched out within an hour or two of release to the 
general public. Hell, that's true of most companies' internal releases too.

D.
                                            
Maarten
<one-way hash for password verification>


That sounds as though you want to verify a licence - meaning again a
password verification, no decryption necessary. I may be wrong of course.

Groetjes,
Maarten Wiltink