利用cuda生成下列算法的密码表怎么做?
public private: static String __gc* Encrypt_MD5_Pwd(String __gc* strpwd)
{
String __gc* s = S"aaaa,dddccc";
MD5 __gc* md = __gc new MD5CryptoServiceProvider();
Byte __gc* bytes __gc [] = Encoding::Default->GetBytes(s);
Byte __gc* buffer2 __gc [] = Encoding::Default->GetBytes(strpwd);
Byte __gc* buffer __gc [] = __gc new Byte __gc*[((bytes->Length + 4) + buffer2->Length)];
Int32 __gc* index = 0;
while ((index < buffer2->Length))
{
buffer[index] = buffer2[index];
index++;
}
buffer[index++] = 0xa3;
buffer[index++] = 0xac;
buffer[index++] = 0xa1;
buffer[index++] = 0xa3;
for (Int32 __gc* i = 0; (i < bytes->Length); i++)
{
buffer[index] = bytes[i];
index++;
}
Byte __gc* buffer4 __gc [] = md->ComputeHash(buffer);
String __gc* str2 = 0;
for (index = 0; (index < buffer4->Length); index++)
{
String __gc* str3 = buffer4[index]->ToString(S"x");
if (str3->Length == 1)
{
str3 = String::Concat(S"0", str3);
}
str2 = String::Concat(str2, str3);
}
return str2;
}
本人刚刚开始学习相应的CUDA.想利用CUDA生成这个算法.上面的代码是vs2003 下面的VC写的. 想利用这个算法生成相应的密码本.不知道哪位大大可以指导一二.