473,322 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

SHA1

Hi Folks,
Could someone gime an example of criptography using SHA1 ? Is it easy ?
That a simple login system, I just need to criptography the pwd when I
insert and when i retrive from the DataBase.

Thank you all!

--

Daniel Andrade Groh
CTF Technologies
Nov 17 '05 #1
1 1886
Actually, it is very simple if you use the .NET WEb Security Encryption.
Something like this:

System.Web.Security.HashPasswordForStoringInConfig File("thepassword", "SHA1");

The only problem is you can't decrypt it because the framework uses it's own
key, which you cannot see. HOWEVER, assuming you used the same key for all
passwords, you can specify your own key to the Framework in the
machine.config file. It will use that key all the time.

With that simple line of code you can encrypt a password and compare it to a
value that is already encrypted.

However, if you need to do manual encryption, it is straight forward as
well. I can explain that to you if this doesn't help.

"Daniel Groh" wrote:
Hi Folks,
Could someone gime an example of criptography using SHA1 ? Is it easy ?
That a simple login system, I just need to criptography the pwd when I
insert and when i retrive from the DataBase.

Thank you all!

--

Daniel Andrade Groh
CTF Technologies

Nov 17 '05 #2

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

Similar topics

3
by: Randell D. | last post by:
Folks, I use md5 hash with some of my cookies and occassionally a hidden form field - I know the physical data on my network is insecure (unless being served via https) but I was wondering if...
2
by: Rafal 'Raf256' Maj | last post by:
Hello, where can I find ready to use functions for hasing into md5 and sha1 ? I.e. ansi C code like: void makeMd5(unsigned char* input, long size, unsigned char* output) { .... } Ready to...
6
by: Chang | last post by:
How to get SHA1 or MD5 of a big file (+5MB - 20GB) as I can't read 20GB into memory. -- Chang.
5
by: Michael H | last post by:
Hi all, I guess I don't fully understand how a SHA1 hash value is calculated in C# / .NET for a large file... I'm trying to calculate SHA1 values for large files that are much larger than my...
0
by: Dil via .NET 247 | last post by:
Fresher to .NET Aiming to produce a resulting hash of length 24 CHARACTERS, using MD5 or SHA1 Algorithms. According to the Class Libraries, the hash size for the SHA1 algorithm is 160 bits, and...
2
by: Marcus | last post by:
Hello, I have read several online tutorials advocating storing a sha1() hashed password in a column of type BLOB. As far as I can tell, sha1() always returns a string of 40 characters,...
0
by: VAISH | last post by:
Hi I am using C# (.NET) to do the following I am trying to canonicalize the xml and signing the xml using sha1. Please read the scenario below I have form with few fields, when I click save...
8
by: sathyashrayan | last post by:
Dear group, For a log-in page I have created a mysql db and user registers with a user name and password. The password field is encrypted with $passwd = sha1($_REQUEST); I insert the...
2
by: amygdala | last post by:
Hi, Does anybody now of a custom crypt function that implements sha1? The thing I like about crypt is that I don't have to worry about (re)generating salt when querying the database. Or are...
7
by: php.developer2007 | last post by:
I want to know to decode sha1 encoded url into normal url. Example www.example.com/<sha1 code>/index1.htm I want this to www.example.com/index1.htm
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.