943,884 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 43191
  • VB.NET RSS
You are currently viewing page 1 of this multi-page discussion thread
May 19th, 2004
0

How to create SHA1 Encryption program

Expand Post »
How do I go about creating a windows application that converts strings to sha1 encrypted? All I want this program to do is have a user type in their password, click a command button "Convert" and have a label come up with the now SHA1 encrypted string. NOTE: THis is just for my own personal use, I will be in no way distributing or selling this program.
Reputation Points: 115
Solved Threads: 7
Practically a Master Poster
Slade is offline Offline
633 posts
since Mar 2004
May 22nd, 2004
0

Re: How to create SHA1 Encryption program

Ok, I will bite. What is SHA1 encryption?
Team Colleague
Reputation Points: 211
Solved Threads: 27
Master Poster
Paladine is offline Offline
793 posts
since Feb 2003
May 22nd, 2004
0

Re: How to create SHA1 Encryption program

SHA1 is an algorithm (Secure Hash Algorithm version 1.0) for encrpyting strings.


http://www.w3.org/PICS/DSig/SHA1_1_0.html happy reading dude.

Slade
Reputation Points: 115
Solved Threads: 7
Practically a Master Poster
Slade is offline Offline
633 posts
since Mar 2004
May 23rd, 2004
0

Re: How to create SHA1 Encryption program

:eek:

Wow, that is some reading.

:o

From a quick glance, I am guessing you will need to use RegEx for managing Regular Expressions.

Not sure I can be much help? :cry: Anyone else? Tekmaven?
Team Colleague
Reputation Points: 211
Solved Threads: 27
Master Poster
Paladine is offline Offline
793 posts
since Feb 2003
May 23rd, 2004
0

Re: How to create SHA1 Encryption program

it's ok, my supervisor is teaching me how to use crypto stuff. I will tell you more later.
Reputation Points: 115
Solved Threads: 7
Practically a Master Poster
Slade is offline Offline
633 posts
since Mar 2004
May 24th, 2004
0

Re: How to create SHA1 Encryption program

Slade - I was just surfing around and found this site on SHA1 Encryption. Hope this helps!
:lol:
SHA1 Encryption Program
Team Colleague
Reputation Points: 211
Solved Threads: 27
Master Poster
Paladine is offline Offline
793 posts
since Feb 2003
May 24th, 2004
0

Re: How to create SHA1 Encryption program

Thanks! My hardware should be arriving this week which means an article on forms authentication is due.
Reputation Points: 115
Solved Threads: 7
Practically a Master Poster
Slade is offline Offline
633 posts
since Mar 2004
Jun 3rd, 2004
0

Re: How to create SHA1 Encryption program

I can't understand why my code wont work. Check it out.
 
Imports SHA1_Encryption 
Imports System.Security.Cryptography
 
PublicClass Form1 
Inherits System.Windows.Forms.Form
 
(Windows for designer generated code)
 
PublicFunction ComputeHashValue(ByVal data() AsByte) AsByte() 
Dim hashAlg As SHA1 = SHA1.Create() 
Dim hashvalue() AsByte = hashAlg.ComputeHash(data) 
Return hashvalue 
EndFunction
 
PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 
Dim test AsByte() 
test = ComputeHashValue(Encoding.ASCII.Text(TextBox1.Text)) 
EndSub 
EndClass
 
The encoding part wont work and when I hover over it it says. "Name 'Encoding' is not declared." any ideas? Maybe I'm missing a library reference?
Reputation Points: 115
Solved Threads: 7
Practically a Master Poster
Slade is offline Offline
633 posts
since Mar 2004
Jun 3rd, 2004
0

Re: How to create SHA1 Encryption program

OK I would still like to get the windows encryption working (above) but I have finished a web application one for now:
Imports System.Web.Security

PrivateSub btnProcess_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnProcess.Click
Dim encpass AsString = FormsAuthentication.HashPasswordForStoringInConfigFile(txtPassword.Text, "sha1")
lblResult.Text = encpass.ToString()
EndSub
Reputation Points: 115
Solved Threads: 7
Practically a Master Poster
Slade is offline Offline
633 posts
since Mar 2004
Jun 3rd, 2004
0

Re: How to create SHA1 Encryption program

No sure, but give me a chance to look at it tomorrow morning.

By the way, not to change the topic, how did you get the code to come out color coded when posting it here??
Team Colleague
Reputation Points: 211
Solved Threads: 27
Master Poster
Paladine is offline Offline
793 posts
since Feb 2003

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: TO retrieive all user account name
Next Thread in VB.NET Forum Timeline: interger





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC