How to create SHA1 Encryption program

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Mar 2004
Posts: 634
Reputation: Slade has a spectacular aura about Slade has a spectacular aura about 
Solved Threads: 7
Slade's Avatar
Slade Slade is offline Offline
Practically a Master Poster

How to create SHA1 Encryption program

 
0
  #1
May 19th, 2004
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.
Formerly known as Slade.
Reply With Quote Quick reply to this message  
Join Date: Feb 2003
Posts: 793
Reputation: Paladine has a spectacular aura about Paladine has a spectacular aura about Paladine has a spectacular aura about 
Solved Threads: 27
Team Colleague
Paladine's Avatar
Paladine Paladine is offline Offline
Master Poster

Re: How to create SHA1 Encryption program

 
0
  #2
May 22nd, 2004
Ok, I will bite. What is SHA1 encryption?
Assistant Manager, Pharmacy Informatics
Wordpress Learning Blog
Updated : ASP.Net Login Code
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 634
Reputation: Slade has a spectacular aura about Slade has a spectacular aura about 
Solved Threads: 7
Slade's Avatar
Slade Slade is offline Offline
Practically a Master Poster

Re: How to create SHA1 Encryption program

 
0
  #3
May 22nd, 2004
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
Formerly known as Slade.
Reply With Quote Quick reply to this message  
Join Date: Feb 2003
Posts: 793
Reputation: Paladine has a spectacular aura about Paladine has a spectacular aura about Paladine has a spectacular aura about 
Solved Threads: 27
Team Colleague
Paladine's Avatar
Paladine Paladine is offline Offline
Master Poster

Re: How to create SHA1 Encryption program

 
0
  #4
May 23rd, 2004
: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?
Assistant Manager, Pharmacy Informatics
Wordpress Learning Blog
Updated : ASP.Net Login Code
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 634
Reputation: Slade has a spectacular aura about Slade has a spectacular aura about 
Solved Threads: 7
Slade's Avatar
Slade Slade is offline Offline
Practically a Master Poster

Re: How to create SHA1 Encryption program

 
0
  #5
May 23rd, 2004
it's ok, my supervisor is teaching me how to use crypto stuff. I will tell you more later.
Formerly known as Slade.
Reply With Quote Quick reply to this message  
Join Date: Feb 2003
Posts: 793
Reputation: Paladine has a spectacular aura about Paladine has a spectacular aura about Paladine has a spectacular aura about 
Solved Threads: 27
Team Colleague
Paladine's Avatar
Paladine Paladine is offline Offline
Master Poster

Re: How to create SHA1 Encryption program

 
0
  #6
May 24th, 2004
Slade - I was just surfing around and found this site on SHA1 Encryption. Hope this helps!
:lol:
SHA1 Encryption Program
Assistant Manager, Pharmacy Informatics
Wordpress Learning Blog
Updated : ASP.Net Login Code
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 634
Reputation: Slade has a spectacular aura about Slade has a spectacular aura about 
Solved Threads: 7
Slade's Avatar
Slade Slade is offline Offline
Practically a Master Poster

Re: How to create SHA1 Encryption program

 
0
  #7
May 24th, 2004
Thanks! My hardware should be arriving this week which means an article on forms authentication is due.
Formerly known as Slade.
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 634
Reputation: Slade has a spectacular aura about Slade has a spectacular aura about 
Solved Threads: 7
Slade's Avatar
Slade Slade is offline Offline
Practically a Master Poster

Re: How to create SHA1 Encryption program

 
0
  #8
Jun 3rd, 2004
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?
Formerly known as Slade.
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 634
Reputation: Slade has a spectacular aura about Slade has a spectacular aura about 
Solved Threads: 7
Slade's Avatar
Slade Slade is offline Offline
Practically a Master Poster

Re: How to create SHA1 Encryption program

 
0
  #9
Jun 3rd, 2004
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
Formerly known as Slade.
Reply With Quote Quick reply to this message  
Join Date: Feb 2003
Posts: 793
Reputation: Paladine has a spectacular aura about Paladine has a spectacular aura about Paladine has a spectacular aura about 
Solved Threads: 27
Team Colleague
Paladine's Avatar
Paladine Paladine is offline Offline
Master Poster

Re: How to create SHA1 Encryption program

 
0
  #10
Jun 3rd, 2004
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??
Assistant Manager, Pharmacy Informatics
Wordpress Learning Blog
Updated : ASP.Net Login Code
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the VB.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC