I think that those algorithms are useful for more than files and already exist in Erlang. What advantage do you see over using
File.open(path) |> :crypto.hash(:md5) That isn't streaming but I think it is very clear. Amos King Binary Noggin > On Jun 13, 2017, at 08:43, [email protected] wrote: > > Hello everybody, > > I propose adding a File.checksum/2 function to create a (md5/sha1/sha256/...) > checksum of a given file path. > The function might have the following signature: > > checksum(String.t, Atom.t) :: {:ok, String.t} | {:error, String.t} > > - The first attribute is the path to the file where a checksum should be > computed. > - The second attribute addresses the used hashing algorithm as an atom e.g. > :md5, :sha, :sha256, according to the the algorithms provided by erlang. > > After searching the web for quite a long time, it was hard to find a suitable > AND efficient implementation of creating file checksums with Elixir. > Therefore, I’m convinced this function will help many developers creating > file checksums. > > Regards, > Matthias > -- > You received this message because you are subscribed to the Google Groups > "elixir-lang-core" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elixir-lang-core/ee960cf6-b4dd-4638-acc4-a3eee37c63aa%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/9F42D635-2B27-4F1B-B972-DFDD7625F523%40binarynoggin.com. For more options, visit https://groups.google.com/d/optout.
