using System;
/**//* The reason that i am using interface is that, in several
* weeks i will use a bitwise operator for have encryption and decryption
* */ publicinterface IBindesh
{
string encode(string str);
string decode(string str);
} namespace EncryptionDecryption
{
/**////<summary> /// Summary description for EncryptionDecryption.
///</summary> publicclass EncryptionDecryption : IBindesh
{
publicstring encode(string str)
{
string htext =""; // blank text for ( int i =0; i < str.Length; i++)
{
htext = htext + (char) (str[i] +10-1*2);
} return htext;
} publicstring decode(string str)
{
string dtext ="";
for ( int i=0; i < str.Length; i++)
{
dtext = dtext + (char) (str[i] -10+1*2);
} return dtext;
} } }
posted on
2005-04-08 12:32Ansel
阅读(976)
评论(3)
收藏举报