using System;
public interface IBindesh
{
string encode(string str);
string decode(string str);
}
namespace EncryptionDecryption
{
///
/// 加密解密
///
public class EncryptionDecryption : IBindesh
{
public string encode(string str)
{
string htext = "";
for ( int i = 0; i < str.Length; i++)
{
htext = htext + (char) (str[i] + 10 - 1 * 2);
}
return htext;
}
public string decode(string str)
{
string dtext = "";
for ( int i=0; i < str.Length; i++)
{
dtext = dtext + (char) (str[i] - 10 + 1*2);
}
return dtext;
}
}
public class test
{
public static void aa()
{
EncryptionDecryption inter = new EncryptionDecryption();
Console.WriteLine(((IBindesh)inter).encode("aa"));
System.Console.ReadLine();
}
}
}
public interface IBindesh
{
string encode(string str);
string decode(string str);
}
namespace EncryptionDecryption
{
///
/// 加密解密
///
public class EncryptionDecryption : IBindesh
{
public string encode(string str)
{
string htext = "";
for ( int i = 0; i < str.Length; i++)
{
htext = htext + (char) (str[i] + 10 - 1 * 2);
}
return htext;
}
public string decode(string str)
{
string dtext = "";
for ( int i=0; i < str.Length; i++)
{
dtext = dtext + (char) (str[i] - 10 + 1*2);
}
return dtext;
}
}
public class test
{
public static void aa()
{
EncryptionDecryption inter = new EncryptionDecryption();
Console.WriteLine(((IBindesh)inter).encode("aa"));
System.Console.ReadLine();
}
}
}