Does Nettle have APIs to hash a file/stream?
sfchen opened this issue · comments
Shifu Chen commented
like following APIs:
- hexdigest("md5", open("data.txt"))
- hexdigest_file("md5", "data.txt")
Elliot Saba commented
I like your first idea best, so I have implemented it in 37e1c9a8
Tony Kelman commented
though it's best to use do
block syntax to avoid leaking file descriptors