I'm not to familiar with C#, but I need help creating a little program to encrypt and decrypt values using something similar to the following code:
this.EncryptValues(strArray[0].Trim() + "*" + strArray[1].Trim(), ref Info.Key);
byte i = Conversions.ToByte(Info.Key.Substring(Info.Key.Length - 8, 3).ToString());
byte j = Conversions.ToByte(Info.Key.Substring(Info.Key.Length - 5, 3).ToString());
byte k = Conversions.ToByte(Info.Key.Substring(Info.Key.Length - 2, 2).ToString());
this.Values(strArray[2], ref Info.RF, i, j, k, 1);
this.Values(strArray[3], ref Info.RV, i, j, k, 2);
this.Values(strArray[4], ref Info.RW, i, j, k, 3);
this.Values(strArray[5], ref Info.CF, i, j, k, 4);
this.Values(strArray[6], ref Info.CV, i, j, k, 5);
this.Values(strArray[7], ref Info.CW, i, j, k, 6);
this.Values(strArray[8], ref Info.FM, i, j, k, 7);
this.Values(strArray[9], ref Info.PF, i, j, k, 8);
this.Values(strArray[10], ref Info.Expires, i, j, k, 9);
byte i = Conversions.ToByte(Info.Key.Substring(Info.Key.Length - 8, 3).ToString());
byte j = Conversions.ToByte(Info.Key.Substring(Info.Key.Length - 5, 3).ToString());
byte k = Conversions.ToByte(Info.Key.Substring(Info.Key.Length - 2, 2).ToString());
this.Values(strArray[2], ref Info.RF, i, j, k, 1);
this.Values(strArray[3], ref Info.RV, i, j, k, 2);
this.Values(strArray[4], ref Info.RW, i, j, k, 3);
this.Values(strArray[5], ref Info.CF, i, j, k, 4);
this.Values(strArray[6], ref Info.CV, i, j, k, 5);
this.Values(strArray[7], ref Info.CW, i, j, k, 6);
this.Values(strArray[8], ref Info.FM, i, j, k, 7);
this.Values(strArray[9], ref Info.PF, i, j, k, 8);
this.Values(strArray[10], ref Info.Expires, i, j, k, 9);
Josip MajicPosted Mar 19, 2008, 9:17 AM
Google search will give you many ways of doing that; here is one:
http://www.obviex.com/samples/Encryption.aspx