473,382 Members | 1,165 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,382 software developers and data experts.

Crypthography helo

hello people
here is example how to hash something
I want to set key for that but i don't know how??
Code works but how can i put secret key code and after that decrypt

sorry for my english :)
Sub Main()

Dim x_str As String = "Some text"

Dim x_message_data() As Byte = Encoding.Default.GetBytes(x_str)

Dim x_hash_code As HashAlgorithm = HashAlgorithm.Create("MD5")

Dim x_hash_message() As Byte = x_hash_code.ComputeHash(x_message_data)

Dim x As Byte

For Each x In x_hash_message

Console.Write(x)

Next

Console.ReadLine()

End Sub
Nov 22 '05 #1
3 1426
Alen Gurović <iv***********@zg.htnet.hr> wrote:
here is example how to hash something
I want to set key for that but i don't know how??
Code works but how can i put secret key code and after that decrypt


Hash algorithms don't work that way - they're one way, not two way. You
don't decrypt the results.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 22 '05 #2
Alen Gurović <iv***********@zg.htnet.hr> wrote:
here is example how to hash something
I want to set key for that but i don't know how??
Code works but how can i put secret key code and after that decrypt


Hash algorithms don't work that way - they're one way, not two way. You
don't decrypt the results.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 22 '05 #3
Hello Alen,

You've asked this same question in three threads on two newsgroups with
different answers each time. Are you understanding the answers?

Creating a hash is not the same as encrypting. Hash algorithms are used for
non-repudiation (aka "signatures"), not for hiding information from prying
eyes.

Do not use a hashing algorithm. Use a private-key encryption algorithm like
TripleDES or AES.

--- Nick

"Alen Gurović" <iv***********@zg.htnet.hr> wrote in message
news:cg**********@ls219.htnet.hr...
hello people
here is example how to hash something
I want to set key for that but i don't know how??
Code works but how can i put secret key code and after that decrypt

sorry for my english :)
Sub Main()

Dim x_str As String = "Some text"

Dim x_message_data() As Byte = Encoding.Default.GetBytes(x_str)

Dim x_hash_code As HashAlgorithm = HashAlgorithm.Create("MD5")

Dim x_hash_message() As Byte = x_hash_code.ComputeHash(x_message_data)

Dim x As Byte

For Each x In x_hash_message

Console.Write(x)

Next

Console.ReadLine()

End Sub

Nov 22 '05 #4

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

Similar topics

18
by: jblazi | last post by:
I should like to search certain characters in a string and when they are found, I want to replace other characters in other strings that are at the same position (for a very simply mastermind game)...
2
by: Alen Gurović | last post by:
hello people here is example how to hash something I want to set key for that but i don't know how?? Code works but how can i put secret key code and after that decrypt sorry for my english :)...
1
by: Mike McAllister | last post by:
Is there a way to force SmtpClient.Send to respond to the remote server's 220 message with HELO instead of EHLO? System.Web.Mail worked fine in 1.1 for me on many SMTP email servers. However,...
2
by: nittin14 | last post by:
I am facing a problem pls if u know the solution then send me. thanks in advance my problem is : suppose there is a table: employee Job_category //column name in employee table t // data in...
2
by: manjesh | last post by:
hi , i intrested in .net so i plan to learn , kindly guide how to do a prog ,i know vb , can any one help how to start , 1 .i want to know by using all the controls 2 . how to connect with...
7
by: Mtr | last post by:
Using the mail() function, I can easily change the From address that appears in an email. But how do I change the From that gets sent in the SMTP conversation, which results in the address that...
3
by: raaj820 | last post by:
Hi guys, I am new to sql server 2000... I am having an excel attachment which i need to import into my database (i have done this part by using import/export wizard)... so now i am having a tbl in...
5
by: vamsioracle | last post by:
Hi Folks I have written a code to send emails from oracle. Below is the code. I have registered this is Apps and scheduled the concurrent program to run every day. Now i want implement logic, such...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.