91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 7.94KB
    文件類型: .zip
    金幣: 1
    下載: 0 次
    發布日期: 2021-02-01
  • 語言: C/C++
  • 標簽: https??http??COM??Git??MD5??

資源簡介


Compute md5 value of file or string.

Try the following:

$ gcc main_md5.c md5.c -Wall -o md5_test

$ ./md5_test

// you may get following:

[file - md5.c] md5 value:

2a2caf52cb298f177a57a3211213e141

[string - gchinaran@gmail.com] md5 value:

84701974fb98315895e3ed9053a0b389

// and you can check by md5sum

$ md5sum md5.c

2a2caf52cb298f177a57a3211213e141 md5.c

// Last: 16-digit md5 is the middle of 32-digit md5


資源截圖

代碼片段和文件信息

#include?“md5.h“

#include?
#include?
#include?
#include?
#include?
#include?
#include?

#define?READ_DATA_SIZE 1024
#define?MD5_SIZE 16
#define?MD5_STR_LEN (MD5_SIZE?*?2)

//?function?declare
int?Compute_string_md5(unsigned?char?*dest_str?unsigned?int?dest_len?char?*md5_str);
int?Compute_file_md5(const?char?*file_path?char?*md5_str);

/**************?main?test?**************/
int?main(int?argc?char?*argv[])
{
int?ret;
const?char?*file_path?=?“md5.c“;
char?md5_str[MD5_STR_LEN?+?1];
const?char?*test_str?=?“gchinaran@gmail.com“;

//?test?file?md5
ret?=?Compute_file_md5(file_path?md5_str);
if?(0?==?ret)
{
printf(“[file?-?%s]?md5?value:\n“?file_path);
printf(“%s\n“?md5_str);
}

//?test?string?md5?

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-05-08?11:31??Compute-file-or-string-md5-master\
?????文件???????11357??2018-05-08?11:31??Compute-file-or-string-md5-master\LICENSE
?????文件?????????493??2018-05-08?11:31??Compute-file-or-string-md5-master\README.md
?????文件????????2253??2018-05-08?11:31??Compute-file-or-string-md5-master\main_md5.c
?????文件????????5494??2018-05-08?11:31??Compute-file-or-string-md5-master\md5.c
?????文件????????1161??2018-05-08?11:31??Compute-file-or-string-md5-master\md5.h

評論

共有 條評論