1)
./md5_test
md5("") = d41d8cd98f00b204e9800998ecf8427e
md5("a") = 0cc175b9c0f1b6a831c399e269772661
md5("abc") = 900150983cd24fb0d6963f7d28e17f72
md5("message digest") = f96b697d7cb7938d525a2f31aaf161d0
md5("abcdefghijklmnopqrstuvwxyz") = c3fcd3d76192e4007dfb496cca67e13b
md5("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz") = f29939a25efabaef3b87e2cbfe641315
2)
d41d8cd98f0b24e980998ecf8427e
90150983cd24fb0d6963f7d28e17f72
d174ab98d277d9f5a5611c2c9f419d9f
出现了strlen()的错误:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7b7cff1 in __strlen_sse2_pminub () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install glibc-2.17-222.el7.x86_64
(gdb) bt
#0 0x00007ffff7b7cff1 in __strlen_sse2_pminub () from /lib64/libc.so.6
#1 0x0000000000400579 in md5_test () at x1.strlen.c:13
#2 0x00000000004005a0 in main () at x1.strlen.c:19文章来源:https://uudwc.com/A/mNRL2
文章来源地址https://uudwc.com/A/mNRL2