1signature SHA1_ML =
2sig
3  (* A reader assumes a stream or function view of IO. A reader function
4   * takes in stream state and an positive integer n specifying the number
5   * of bytes to read. It returns a vector of n bytes and a new stream
6   * state. The reader should only return less than n bytes if the stream
7   * has ended and n bytes are not available. An input of 0 bytes should
8   * always return an empty vector and cannot be used to check for the end
9   * of the stream.
10   *)
11  type 'a byte_reader = 'a * int -> Word8Vector.vector * 'a
12
13  val sha1 : 'a byte_reader -> 'a -> Word8Vector.vector
14  val sha1String : 'a byte_reader -> 'a -> string
15  val sha1_file : {filename: string} -> string
16
17end
18