项目作者: ne-sachirou

项目描述 :
Stream into SHA1, SHA2, SHA3, BLAKE2, RIPEMD-160 hash. (Hash algorithms which Erlang is supporting.)
高级语言: Elixir
项目地址: git://github.com/ne-sachirou/stream_hash.git
创建时间: 2017-06-25T15:05:52Z
项目社区:https://github.com/ne-sachirou/stream_hash

开源协议:GNU General Public License v3.0

下载


Actions Status
Coverage Status
Hex.pm

StreamHash

Stream into SHA1, SHA2, SHA3, BLAKE2, RIPEMD-160 hash. (Hash algorithms which Erlang is supporting.)

  1. "test/fixture/xyzxyz.txt"
  2. |> File.stream!
  3. |> StreamHash.hash(:sha512)
  4. |> Enum.into("")
  5. # <<215, 133, 241, 243, 115, 159, 59, 127, 111, 242, 140, 106, 171, 211, 130, 48,
  6. # 174, 198, 241, 236, 195, 112, 105, 150, 106, 133, 78, 249, 2, 178, 132, 254,
  7. # 50, 181, 85, 46, 183, 97, 187, 7, 38, 17, 26, 188, 232, 143, 152, 210, 71, 54,
  8. # 245, 48, 107, 70, 180, 43, 96, 26, 69, 90, 17, 156, 111, 65>>

Docs.

Installation

Add stream_hash to your list of dependencies in mix.exs:

  1. def deps do
  2. [{:stream_hash, "~> 0.3"}]
  3. end