使用开源代码,计算文件和字符串SHA1
开源项目:
http://www.codeproject.com/Articles/2463/CSHA1-A-C-Class-Implementation-of-the-SHA-1-Hash-A
void GetSHA()
{
int iIndex = -1;
CSHA1 sha1;
do
{
printf("输入数字选择想校验SHA1的类型:\nFile is 1 \nString is 2 \nExit is 3 \r\n");
scanf("%d",&iIndex);
if (iIndex == 1)
{
TCHAR str[] = {
0};
<