String Encrypt and Decrypt Examples

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Where can I find a code example that will demonstrate the encryption and decryption of a string in C#
I am familiar with "System.Security.Cryptography" encryption, but need a system that will both encrypt and decrypt a string

Is it possible to convert a string that represents a byte array as the output string below


string input = "something"
Byte[] clearBytes = new UnicodeEncoding().GetBytes(input)
string output = BitConverter.ToString(clearBytes)


back into original string "something"

Thank you
 
are the encryption / decryption classes in system.security.cryptography not
good enough?
they can do exactly what you ask for, or am i missing something?

kind regards,
Bruno.


Greg R said:
Where can I find a code example that will demonstrate the encryption and decryption of a string in C#?
I am familiar with "System.Security.Cryptography" encryption, but need a
system that will both encrypt and decrypt a string.
Is it possible to convert a string that represents a byte array as the output string below:

{
string input = "something";
Byte[] clearBytes = new UnicodeEncoding().GetBytes(input);
string output = BitConverter.ToString(clearBytes);
}

back into original string "something"?

Thank you
 
Greg,

Check this: http://www.obviex.com/samples/encryption.aspx.

Alek

Greg R said:
Where can I find a code example that will demonstrate the encryption and decryption of a string in C#?
I am familiar with "System.Security.Cryptography" encryption, but need a
system that will both encrypt and decrypt a string.
Is it possible to convert a string that represents a byte array as the output string below:

{
string input = "something";
Byte[] clearBytes = new UnicodeEncoding().GetBytes(input);
string output = BitConverter.ToString(clearBytes);
}

back into original string "something"?

Thank you
 
Back
Top