By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,515 Members | 1,110 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,515 IT Pros & Developers. It's quick & easy.

SHA256

P: n/a
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
Share this Question
Share on Google+
8 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a

"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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.