Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 encrypt/decrpt password

Author  Topic 

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2006-12-12 : 02:30:50
i am looking for a function that will encrypt and be able to decrypt a password (not to compare!!! - ineed actually to see the encrypted password original passowrd)
can any 1help?
thnaks i advance
peelg

Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-12-12 : 02:58:52
When you searched SQLTeam site, what have you found so far?


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2006-12-12 : 03:03:58
foumnd mostly examples for asp while i look for a code that will run only in the sql server itself

Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-12-12 : 03:07:40
These topics might help you out

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=71001
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=67752


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2006-12-12 : 03:48:59
thanks peso ui have seen your code
but isnt there a way to make a stronger passowrd with your code and not o give just 1
encryption key like '*' ??
i saw another encryptuion code there nbut it gives letters that are not readeable and not hebrew so your function is good enoght but not strong enought

Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-12-12 : 03:53:01
What does GOOGLE tell you when searching for "encrypt commercial tool for sql server"?

I'll give you a few hints
http://www.netlib.com/
http://www.xpcrypt.com/


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2006-12-12 : 04:09:15
i dont want commercial tool
i want some free code :)

Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-12-12 : 04:12:37
Which "strong" password algorithm do you want?


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2006-12-12 : 04:13:29
maybe something like MD5 9dont have to be that strong but MD5 is good enough)
but must be encrypt decrupt function for it


Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-12-12 : 04:16:54
MD5 is only a hash algorithm. There is no way to decrypt the value bck to it's original content.
I might be wrong, though! See this http://md5.rednoize.com/

Try again.



Peter Larsson
Helsingborg, Sweden
Go to Top of Page

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2006-12-12 : 04:36:46
hey nice
do u have code forthat? :)

Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-12-12 : 04:39:44
Wait just a minute... I will check my back pockets for the hash algorithm paper note I always carry with me for these circumstances.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-12-12 : 04:42:28
No. I didn't find it.
Maybe you should try emailing the webadmin for the site mentioned above and ask for it?
And you would be doing us a great favor if you could post it here for us.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2006-12-12 : 05:24:54
quote:

The database stores now about 35,000,000 md5/sha1 hashes with their plain text counterpart.


they have a DB for convert:)

Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-12-12 : 05:31:23
Back to square 1 then?


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2006-12-12 : 05:33:31
i found an RC4 encryption code i will try to convert it to SQL SERVER code
http://www.4guysfromrolla.com/webtech/010100-1.shtml

Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-12-12 : 05:48:22
Also read this article about RC4 http://en.wikipedia.org/wiki/RC4 especially the section of Security.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2006-12-12 : 06:18:48
shit so anoyther way?idea?

Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-12-12 : 07:41:56
I wrote the function after lunch here
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=76258


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2006-12-12 : 09:21:09
MD5 is a one way hashing algorithm and there is no way you can get it back to the original content. MD5 is often used for binary file checksums and if you MD5 a 50MB file it will still give you a 32-character string in return. Naturally that can't be converted back to it's original format ;) If you'd still like to use MD5 you can find it here: http://www.codeproject.com/database/xp_md5.asp

I haven't revewed Peso's function but a very common encrypt/decrypt algorithm is Base64. Look at it and download here: http://www.sqlservercentral.com/columnists/mcoles/freeencryption.asp

--
Lumbago
"Real programmers don't document, if it was hard to write it should be hard to understand"
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2006-12-12 : 09:56:53
The free version of XP_CRYPT has MD5, SHA1, and DES hashes for strings of unlimited length. It also has RSA, DSA, AES, DESX, and RC4 encryption/decryption for strings of up to 14 characters. Since it is a DLL extended stored procedure, It is probably much faster than doing it in SQL.

http://www.xpcrypt.com/products.html




CODO ERGO SUM
Go to Top of Page
    Next Page

- Advertisement -