Digest.BLAKE512(3)

✨ Digest.BLAKE512(3) ✨

okay so bestie, welcome to the Digest.BLAKE512 glow-up page πŸ’… this is the OCaml library corner of the universe and we're about to get into the good hash stuff. buckle up πŸŽ€


πŸ’– NAME πŸ’–

Digest.BLAKE512 β€” BLAKE512 is the BLAKE2b hash function producing 512-bit (64-byte) digests. no cap, that's literally the whole vibe. πŸ”₯


πŸ¦‹ Module πŸ¦‹

Module Digest.BLAKE512


🌸 Documentation 🌸

Module BLAKE512 : S

okay so here's the tea β˜• β€” BLAKE512 is the BLAKE2b hash function producing 512-bit (64-byte) digests. it is cryptographically secure, and the digests are large enough to thwart brute-force attacks. like, the security is genuinely giving main character energy πŸ‘‘πŸ”’

Since 5.2


⭐ type t = string

The type of digests. that's it, that's the type 🫢


⭐ val hash_length : int

The length of digests, in bytes. iconic little number, fr fr.


⭐ val compare : t -> t -> int

Compare two digests, with the same specification as compare.


⭐ val equal : t -> t -> bool

Test two digests for equality. are they the same? vibe check time ✨


⭐ val string : string -> t

Return the digest of the given string.


⭐ val bytes : bytes -> t

Return the digest of the given byte sequence.


⭐ val substring : string -> int -> int -> t

substring s ofs len returns the digest of the substring of s starting at index ofs and containing len characters. slice it, dice it, hash it πŸŽ€


⭐ val subbytes : bytes -> int -> int -> t

subbytes s ofs len returns the digest of the subsequence of s starting at index ofs and containing len bytes.


⭐ val channel : in_channel -> int -> t

Read characters from the channel and return their digest. See Digest.channel for the full specification. iykyk 😌


⭐ val file : string -> t

Return the digest of the file whose name is given. yes, just hand it the filename and it goes to work πŸ’…


⭐ val output : out_channel -> t -> unit

Write a digest on the given output channel.


⭐ val input : in_channel -> t

Read a digest from the given input channel.


⭐ val to_hex : t -> string

Return the printable hexadecimal representation of the given digest.

🚨 Raises Invalid_argument if the length of the argument is not hash_length. like, don't try it πŸ™ˆ

⭐ val of_hex : string -> t

Convert a hexadecimal representation back into the corresponding digest.

🚨 Raises Invalid_argument if the length of the argument is not 2 * hash_length, or if the argument contains non-hexadecimal characters. so keep it clean, bestie πŸ’€

and that's the page!! 🧚 written with love by OCamldoc, version dated 2026-06-22 β€” catch you on the next manpage, mwah πŸ’œπŸŒˆπŸ“

πŸ“¦ where this page comes from