请问有谁知道怎么把 http://www.google.com
变成: aHR0cDovL3d3dy5nb29nbGUuY29t或者说这是什么加密的方式,或是 URL编码吗?
例如这个网站
http://www.naminglai.com/index.php传递给它一个get参数 :aHR0cDovL3d3dy5nb29nbGUuY29t
http://www.naminglai.com/index.php?q=aHR0cDovL3d3dy5nb29nbGUuY29t&hl=3ed
变成: aHR0cDovL3d3dy5nb29nbGUuY29t或者说这是什么加密的方式,或是 URL编码吗?
例如这个网站
http://www.naminglai.com/index.php传递给它一个get参数 :aHR0cDovL3d3dy5nb29nbGUuY29t
http://www.naminglai.com/index.php?q=aHR0cDovL3d3dy5nb29nbGUuY29t&hl=3ed
DESCryptoServiceProvider DES = new DESCryptoServiceProvider();
DES.Key = ASCIIEncoding.ASCII.GetBytes(sKey);
DES.IV = ASCIIEncoding.ASCII.GetBytes(sKey);
ICryptoTransform desencrypt = DES.CreateEncryptor();
byte[] result = desencrypt.TransformFinalBlock(data, 0, data.Length);
return BitConverter.ToString(result); string[] sInput = sInputString.Split("-".ToCharArray());
byte[] data = new byte[sInput.Length];
for (int i = 0; i < sInput.Length; i++)
{
data[i] = byte.Parse(sInput[i], NumberStyles.HexNumber);
}
DESCryptoServiceProvider DES = new DESCryptoServiceProvider();
DES.Key = ASCIIEncoding.ASCII.GetBytes(sKey);
DES.IV = ASCIIEncoding.ASCII.GetBytes(sKey);
ICryptoTransform desencrypt = DES.CreateDecryptor();
byte[] result = desencrypt.TransformFinalBlock(data, 0, data.Length);
return Encoding.UTF8.GetString(result);