熟悉VB的进来看下
帮忙实现一个同下列代码同样功能的vb 6 函数,不是vb.net
public string EncryptPassword(string password)
{
UnicodeEncoding encoding = new UnicodeEncoding();
byte[] hashBytes = encoding.GetBytes(password);
//compute SHA-1 hash.
SHA1 sha1 = new SHA1CryptoServiceProvider();
byte[] cryptPassword = sha1.ComputeHash(hashBytes);
return Convert.ToBase64String(cryptPassword);
}
多谢,对vb不熟悉,懂vb的帮忙看下