Click here to Skip to main content
15,888,020 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
C#
Dim encryptedPassword As New MemoryStream()

      Dim RC2 As New RC2CryptoServiceProvider()
      RC2.Key = Encoding.ASCII.GetBytes(TextBox1.Text)
      Dim iv() As Byte = {10, 20, 30, 40, 50, 60, 70, 80}



who know help me please
Posted
Comments
Sridhar Patnayak 3-Feb-12 11:51am    
What is your error, which output you want? make it clear

1 solution

Probably because it's not the right length for a symmetric key. Given it probably isn't a symmetric key,m thjat shpoudl come as no surprise.

If this is your method encrypting passwords so they can't be read, then don't. Use a Hashing algorithm instead. There is a tip here that talks about this: Password Storage: How to do it.[^]
 
Share this answer
 
Comments
LanFanNinja 3-Feb-12 12:27pm    
+5 Nice tip got me think about somethings.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900