473,588 Members | 2,565 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Saving password as an encrypted string

Hi,

I would like to save my user's passwords as an encrypted sting.

Are their built in functions for doing this?

It's not financial data or anything, just to keep away prying eyes.

many thanks,

NEIL
Apr 25 '06 #1
5 1607
Neil G Jarman wrote on 25 apr 2006 in
microsoft.publi c.inetserver.as p.general:
I would like to save my user's passwords as an encrypted sting.

Are their built in functions for doing this?

It's not financial data or anything, just to keep away prying eyes.


Prying eyes on the server?

That is not usefull, since anyone having access to the server can insert a
password bypassing backdoor.

Perhaps Rot13 will be enough?

Function ROT13(szInput)
txt = ""
coding =
"ABCDEFGHIJKLMN OPQRSTUVWXYZABC DEFGHIJKLMabcde fghijklmnopqrst uvwxyzabcdefghi
jklm"
For i = 1 To Len(szInput)
character = Mid(szInput, i, 1)
position = InStr(coding, character)
If position > 0 Then character = Mid(coding, position + 13, 1)
txt = txt & character
Next
ROT13 = txt
End Function
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Apr 25 '06 #2

"Evertjan." <ex************ **@interxnl.net > wrote in message
news:Xn******** ************@19 4.109.133.242.. .
Neil G Jarman wrote on 25 apr 2006 in
microsoft.publi c.inetserver.as p.general:
I would like to save my user's passwords as an encrypted sting.

Are their built in functions for doing this?

It's not financial data or anything, just to keep away prying eyes.


Prying eyes on the server?

That is not usefull, since anyone having access to the server can insert a
password bypassing backdoor.

Perhaps Rot13 will be enough?

Function ROT13(szInput)
txt = ""
coding =
"ABCDEFGHIJKLMN OPQRSTUVWXYZABC DEFGHIJKLMabcde fghijklmnopqrst uvwxyzabcdefghi
jklm"
For i = 1 To Len(szInput)
character = Mid(szInput, i, 1)
position = InStr(coding, character)
If position > 0 Then character = Mid(coding, position + 13, 1)
txt = txt & character
Next
ROT13 = txt
End Function
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)


Hi Evertjan,

Thanks for the code - yes that's probably enough.

My ony concern is that staff who have access to Enterprise Manager cold look
up the passwords of senoir managers. Best to keep them obscure.

Cheers,

NEIL
Apr 25 '06 #3
Neil G Jarman wrote:
Thanks for the code - yes that's probably enough.

My ony concern is that staff who have access to Enterprise Manager
cold look up the passwords of senoir managers. Best to keep them
obscure.


If that is your concern, then take the correct approach -- store hashed
values, not passwords. When authenticating, compared hashed inputs to the
stored hashed values.
http://en.wikipedia.org/wiki/Hashing

Here is one way to do this: http://www.codeproject.com/database/xp_md5.asp

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
Apr 27 '06 #4
I wrote:
If that is your concern, then take the correct approach -- store
hashed values, not passwords. When authenticating, compared hashed
inputs to the stored hashed values.
http://en.wikipedia.org/wiki/Hashing

Here is one way to do this:
http://www.codeproject.com/database/xp_md5.asp


Also, if you are using SQL Server 2005, you can use the native HashBytes
function: http://msdn2.microsoft.com/en-us/lib...5(SQL.90).aspx

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
Apr 27 '06 #5
Snitz forums use sha256. I think its similar to the hash method
mentioned above. google search:
http://www.google.com/search?q=sha25...en-US:official

Apr 28 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
3697
by: John Victor | last post by:
In my mysql database, I've stored all the passwords using the PASSWORD() function. Now I'm running a test and need to compare the password in my php document to that saved in the database. I used the string "Select name From users Where password = PASSWORD('$testPass')" and ran mysql_query() using the string. But nothing was returned. So I decided to run a test and try to change a password from my php page using the string
4
3197
by: Tim Daneliuk | last post by:
OK, I've Googled for this and cannot seem to quite find what I need. So, I turn to the Gentle Geniuses here for help. Here is what I need to do from within a script: Given a username and a password (plain text): 1) Validate that the password is correct for that user *without actually logging in*. 2) If the password is valid, return a list of all the groups the user belongs to. Otherwise, return some error string.
6
7509
by: Ian Davies | last post by:
Hello I would like to query the user table of the mysql database from my VB application to check that a user's password entered in a text field on a form corresponds to that users password in the mysql database. However, when I retreive the password using an sql statement into a recordset, it is encrypted. How can I decrypt it so I can make the comparison. Ian
4
2585
by: hohans | last post by:
Hi all, I have an encryption class that encrypts and decrypts password using TripleDESCryptoServiceProvider. It was written originally in framework 1.0 and been working fine. And those passwords are stored in my SQL server. Now I need to migrate my application to framework 2.0. I use this same class with framework 2.0 library to decrypt the passwords from database (of course, they were encrypted in 1.0) but getting "Bad Data"
5
1694
by: Skeleton Man | last post by:
Hi, I came across the basic algorithmfor decrypting WS_FTP Pro 6 passwords as follows, and I'm trying to reverse it to make an encryption function: function ws_dec() { var str = prompt('Enter encrypted password (including PWD=):',''); var output = ''; passw=str.substring(37,str.length);
5
2783
by: Vincent Pirez | last post by:
Hi, Has anyone managed to code anything that will verify the username and password of a user against the /etc/shadow file? I need to authenticate users based on their local system accounts, but unfortunately need to do this without recompiling PHP or Apache with custom modules. So far I've managed to pull all of the shadow password strings out and into
5
3292
by: John | last post by:
Hi I am trying to set a new password using the following code; Dim u As MembershipUser = Membership.GetUser(UserName) Dim OldPassword As String OldPassword = u.GetPassword If u.ChangePassword(OldPassword, Password) Then ChangePassword = True
1
2484
by: pawan123 | last post by:
Hi, I am using VB6 and SQL Server 2000. I want to design a logon form. In this form, how can I use a Password field to store in encrypted form in tbluser table and how can I compare password text in this table? Please tell me how I can use encode/decoder algorithm to secure password. User form coding is as follows :-
5
3587
by: Lucvdv | last post by:
This would better be described by 'serialization' than 'interop', but I didn't find a newsgroup that seems closer on topic. The problem in a few words: I save data with DataSet.WriteXML, but I get different data back when I read it later with DataSet.ReadXml. More detail:
0
7929
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
7860
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8222
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8354
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7984
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
3883
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2371
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1458
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1195
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.