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

Re: How to create SHA1 Encryption program

 
0
  #11
Jun 3rd, 2004
lol well I copied and pasted it from vs .net, but I've done it before using this rich text editor
Formerly known as Slade.
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 1
Reputation: esalkin is an unknown quantity at this point 
Solved Threads: 0
esalkin esalkin is offline Offline
Newbie Poster

Re: How to create SHA1 Encryption program

 
0
  #12
Jul 14th, 2004
try
test = ComputeHashValue(System.Text.Encoding.ASCII.GetBytes(TextBox1.Text))
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 2
Reputation: taylorjpt is an unknown quantity at this point 
Solved Threads: 0
taylorjpt taylorjpt is offline Offline
Newbie Poster

Re: How to create SHA1 Encryption program

 
0
  #13
Dec 22nd, 2006
I just finished writing a SHA1 digester for Visual Basic 6. We needed this as a plug in for calculating the Psuedo-ESN in our cell phone database (KWC).

Hope it helps!

jt :eek:

http://www.tayloredge.com/utilities/...1_VBSource.txt
http://www.tayloredge.com/utilities/vbapps/iSHA1.e_e
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 1
Reputation: sembtest is an unknown quantity at this point 
Solved Threads: 0
sembtest sembtest is offline Offline
Newbie Poster

Re: How to create SHA1 Encryption program

 
0
  #14
Jun 22nd, 2007
public static string SHA1(string password)
{
byte[] textBytes = System.Text.Encoding.Default.GetBytes(password);
try
{
System.Security.Cryptography.SHA1CryptoServiceProvider cryptHandler;

cryptHandler = new System.Security.Cryptography.SHA1CryptoServiceProvider();

byte[] hash = cryptHandler.ComputeHash (textBytes);

string ret = "";

foreach (byte a in hash)
{
ret += a.ToString("x2");
}
return ret ;
}
catch
{
throw;
}
}
Last edited by sembtest; Jun 22nd, 2007 at 5:30 am.
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 2
Reputation: taylorjpt is an unknown quantity at this point 
Solved Threads: 0
taylorjpt taylorjpt is offline Offline
Newbie Poster

Re: How to create SHA1 Encryption program

 
0
  #15
Jun 22nd, 2007
I really didn't want to just spit out the answer, but wanted for my own entertainment to write the digester itself.

jt
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