473,769 Members | 4,831 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 1609
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
3717
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
3211
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
7522
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
2595
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
1703
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
2794
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
3301
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
2490
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
3600
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
9579
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
9416
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
10199
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
10032
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
7393
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6661
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5293
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3948
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
3
2810
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.