JuliaCrypto / Nettle.jl

Julia wrapper around nettle cryptographic hashing/encryption library providing MD5, SHA1, SHA2 hashing and HMAC functionality, as well as AES encryption/decryption

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does Nettle have APIs to hash a file/stream?

sfchen opened this issue · comments

like following APIs:

  • hexdigest("md5", open("data.txt"))
  • hexdigest_file("md5", "data.txt")

I like your first idea best, so I have implemented it in 37e1c9a8

though it's best to use do block syntax to avoid leaking file descriptors