md5sum of file in Linux C

前端 未结 5 1993
时光取名叫无心
时光取名叫无心 2020-12-08 15:01

I want to find md5sum of a file in Linux C, Is there any API where I can send file name to get md5sum of that file.

5条回答
  •  暖寄归人
    2020-12-08 15:13

    You can use the mhash library (license is LGPL). On Debian systems:

    sudo apt-get install libmhash-dev
    

    See the man page man 3 mhash

    But I don't think you can just give it the name of a file. You have to open the file yourself, read the data, and feed the data to this library's functions.

提交回复
热议问题