473,322 Members | 1,314 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.

SHA256

Sam
Hi,
Where can I find a short and simple example of how to use SHA256
encryption algorithm in vb.net ? I've heard it is possible, but SHA256
doesn't give much result in MSDN...

Thx

Nov 21 '05 #1
8 12132
Sam,

For this kind of encryption is my starting search argument forever on MSDN
"Rijndael".

http://msdn.microsoft.com/library/de...classtopic.asp

(That is the area where I live at the moment).

I hope this helps

Cor
Nov 21 '05 #2
Sam
Cor,
Never heard of this place.. :)))
I was actually going to use SHA512, as I got it working. I found it
pretty straightforward to use it in fact. But maybe you have arguments
strong enough to convince me using this Rijndael algorithm(how the hell
do you pronounce this???) In which way is it better than SHA512 ? The
purpose of my encryption is for Password encryption.

Regards

Cor Ligthert wrote:
Sam,

For this kind of encryption is my starting search argument forever on MSDN
"Rijndael".

http://msdn.microsoft.com/library/de...classtopic.asp

(That is the area where I live at the moment).

I hope this helps

Cor


Nov 21 '05 #3
Sam
Actually after reading a bit more about it, it's not what i want as
Rijndael encrypted password can be decrypted as well using a key. I
don't want to be able to read that password again, and once encrypted
it should remain encrypted.
I'll stick with SHA512 :)

Thx

Nov 21 '05 #4

"Sam" <sa**************@voila.fr> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
:
: Hi,
:
: Where can I find a short and simple example of how to use
: SHA256 encryption algorithm in vb.net ? I've heard it is
: possible, but SHA256 doesn't give much result in MSDN...
:
: Thx
I was experimenting with something similar once. I wanted a one-way
encrypted string to store the password in a database. Here is the
function I came up with:
--------------------------------------------
Imports System.Security.Cryptography
Imports System.Text

Protected Shared Function SHA256_Encrypt(Txt As String) As String

Dim sha As New SHA256Managed()
Dim ae As New ASCIIEncoding()
Dim Hash() As Byte = sha.ComputeHash(ae.GetBytes(Txt))
Dim sb As New StringBuilder(Hash.Length * 2)
Dim ndx As Integer

For ndx = 0 To Hash.Length - 1
sb.Append(Right("0" & Hex(Hash(ndx)), 2))
Next
Return sb.ToString

End Function
--------------------------------------------

HTH

Ralf
Nov 21 '05 #5
http://msdn.microsoft.com/library/de...classtopic.asp

Hi,
Where can I find a short and simple example of how to use SHA256
encryption algorithm in vb.net ? I've heard it is possible, but SHA256
doesn't give much result in MSDN...

Thx


User submitted from AEWNET (http://www.aewnet.com/)
Nov 21 '05 #6
In message <11*********************@g43g2000cwa.googlegroups. com>, Sam
<sa**************@voila.fr> writes
Cor,
Never heard of this place.. :)))
I was actually going to use SHA512, as I got it working. I found it
pretty straightforward to use it in fact. But maybe you have arguments
strong enough to convince me using this Rijndael algorithm(how the hell
do you pronounce this???) In which way is it better than SHA512 ? The
purpose of my encryption is for Password encryption.


Rain Dial (or something close).

It is now more commonly know as AES and replaces the DES and Triple DES
algorithms. It is also the new standard by the NSA (so if its strong
enough for the US Government, it should be strong enough for most -
providing you keep your key safe).

--
Andrew D. Newbould E-Mail: ne********@NOSPAMzadsoft.com

ZAD Software Systems Web : www.zadsoft.com
Nov 21 '05 #7
it's not encrypted then -- it's hashed and you should know that it is
(theoretically) possible to have a collision (i.e. something else
generates the same value) -- the odds are low with SHA512, however

Nov 21 '05 #8
On 7 Jun 2005 02:23:44 -0700, "Sam" <sa**************@voila.fr> wrote:
Actually after reading a bit more about it, it's not what i want as
Rijndael encrypted password can be decrypted as well using a key. I
don't want to be able to read that password again, and once encrypted
it should remain encrypted.
I'll stick with SHA512 :)

Thx

Some confusion here, SHA512 is not encryption but its a hashing algorithm
Blow fish AES DES and Triple DES is an encrytion technique.
--
Liberty ...
-----------------------------------------------------------------
Liberty :Freedom is first earned
li*************@revolutionist.com :by demanding it. It's lost by
http://pages.sbcglobal.net/spiritof76 :forgetting its value.
-----------------------------------------------------------------
Nov 21 '05 #9

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

Similar topics

92
by: Reed L. O'Brien | last post by:
I see rotor was removed for 2.4 and the docs say use an AES module provided separately... Is there a standard module that works alike or an AES module that works alike but with better encryption?...
2
by: Bryan Olson | last post by:
The current Python standard library provides two cryptographic hash functions: MD5 and SHA-1 . The authors of MD5 originally stated: It is conjectured that it is computationally infeasible to...
4
by: Ravi Singh (UCSD) | last post by:
Hello all I am trying to compare the SHA 256 algorithm as implemented by Christophe Devine and on using the .NET "SHA256Managed" but they do not give me similar hashes. Here is the...
4
by: PJones | last post by:
I am looking for the best way to one way encrypt a password for storage in a database using (asp.net / vb.net) basically I need some functions or examples that I can freely use in a commercial...
1
by: mirandacascade | last post by:
I am attempting to implement a process, and I'm pretty sure that a major roadblock is that I do not understand the nomenclature. The specs indicate that the goal is to calculate a message digest...
9
by: Ben | last post by:
Hello, I'll bet this has been asked a million times but I can't seem to find a thread that gives the clear example I need. This PC has MySQL and IIS configured and running. The MySQL database is...
4
by: vcnewbie | last post by:
Hi I'm maintaining a VisualC++ project to increase its security regarding stored passwords. I thought about using SHA256Managed to create a hash for the password when creating a user and when...
8
by: =?Utf-8?B?Z3JlYXRiYXJyaWVyODY=?= | last post by:
Hi, I'm completely stumped on this but i want to create something that can get the md5 value of an EXE based on the passed in argument and compare it to the specified MD5. I can do the...
6
by: Viji nellaiappan | last post by:
How to encrypt and decrypt password in php ? Is there any built-in function for encryption and decryption ? Help me friends..
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
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: 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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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.