package sha
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=29d051bf35f30132d11e45069688257002bfe26463befda257eedce672f39b84
sha512=029a86e1aab43bc496f7cd285f056f0d5b192e0e90ce989d628b2e64ae1dc03860f91d382337a6a772635fe746cc63fe283e1857fa6ab2f51019c3adb3f19108
doc/sha/Sha256/index.html
Module Sha256
Source
SHA256 OCaml binding
context type - opaque
buffer type
digest type - opaque
Sha256.unsafe_update_substring ctx s ofs len updates the context with the substring of s starting at character number ofs and containing len characters. Unsafe: No range checking!
Sha256.update_substring ctx s ofs len updates the context with the substring of s starting at character number ofs and containing len characters.
Sha256.update_string ctx s updates the context with s.
Sha256.update_buffer ctx a updates the context with a. Runs parallel to other threads if any exist.
Sha256.substring s ofs len returns the digest of the substring of s starting at character number ofs and containing len characters.
If len is nonnegative, Sha256.channel ic len reads len characters from channel ic and returns their digest, or raises End_of_file if end-of-file is reached before len characters are read. If len is negative, Sha256.channel ic len reads all characters from ic until end-of-file is reached and return their digest.
Return the digest of the file whose name is given using fast C function
Write a digest on the given output channel.
Read a digest from the given input channel.