谁能帮我解释一下这个密码规则是怎么解的? 越详细越好,因为我是要根据这个规则,然后用ASP来解密!
下面是原来的解密规则:把“密码”替换成你要解密的密码就可以public string DESDecrypt(“密码”, "micronettenorcim")
{
byte[] keyBytes, IV;
getKeyBytes(key, out keyBytes, out IV);
byte[] inputBuffer = Convert.FromBase64String(encryptedString);
DESCryptoServiceProvider sp = new DESCryptoServiceProvider();
ICryptoTransform tr = sp.CreateDecryptor(keyBytes, IV);
MemoryStream stream = new MemoryStream(inputBuffer);
CryptoStream cryptoStream = new CryptoStream(stream, tr, CryptoStreamMode.Read); string result = new StreamReader(cryptoStream, Encoding.UTF8).ReadToEnd();
cryptoStream.Close();
stream.Close();
return result;
}
下面是原来的解密规则:把“密码”替换成你要解密的密码就可以public string DESDecrypt(“密码”, "micronettenorcim")
{
byte[] keyBytes, IV;
getKeyBytes(key, out keyBytes, out IV);
byte[] inputBuffer = Convert.FromBase64String(encryptedString);
DESCryptoServiceProvider sp = new DESCryptoServiceProvider();
ICryptoTransform tr = sp.CreateDecryptor(keyBytes, IV);
MemoryStream stream = new MemoryStream(inputBuffer);
CryptoStream cryptoStream = new CryptoStream(stream, tr, CryptoStreamMode.Read); string result = new StreamReader(cryptoStream, Encoding.UTF8).ReadToEnd();
cryptoStream.Close();
stream.Close();
return result;
}
用下面的代码解密
public string DESDecrypt(“密码”, "micronettenorcim")
{
byte[] keyBytes, IV;
getKeyBytes(key, out keyBytes, out IV);
byte[] inputBuffer = Convert.FromBase64String(encryptedString);
DESCryptoServiceProvider sp = new DESCryptoServiceProvider();
ICryptoTransform tr = sp.CreateDecryptor(keyBytes, IV);
MemoryStream stream = new MemoryStream(inputBuffer);
CryptoStream cryptoStream = new CryptoStream(stream, tr, CryptoStreamMode.Read); string result = new StreamReader(cryptoStream, Encoding.UTF8).ReadToEnd();
cryptoStream.Close();
stream.Close();
return result;
} 第一个表 Corporation
部分密码如下:7OdVUPiju4k=
xjwb0IeBdu01BF8nDbMuKA==
gVIXTTdI9kU=
7r7YhYF07CjiuNQZQiquVQ==
OwmvpwoZdqo=字段如下:
Id 编号
Account 帐号
Password 密码
newPassword 还原的密码把还原的密码写进 newPassword 字段,谢谢!第二个表 VIPCard
部分密码如下:/Fkc1kND/Wg=
HNq+W82NSoE=
Nleq+deYzRs=
mnN+WHy7vgw=字段:
ID 编号
sCardNum 卡号
sPassWord 密码
newPassword 还原的密码把还原的密码写进 newPassword 字段,谢谢!第三个表 IndividualMember
部分密码如下:9LKC/kXT/Ck=
Lyz402LLvMeLINnA+dr2RQ==
7e6h+ZIGnEY=
gZowwOPzQdz7BC88aoG+bg==字段:
Id 编号
Account 帐号
Password 密码
newPassword 还原的密码把还原的密码写进 newPassword 字段,谢谢!给分!