473,405 Members | 2,373 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,405 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 12150
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.