模組 Digest.BLAKE512

module BLAKE512: S 

BLAKE512 是 BLAKE2b 雜湊函式,產生 512 位元(64 位元組)的摘要。它具有密碼學上的安全性,且摘要足夠大,可以阻止暴力破解攻擊。


type t = string 

摘要的類型。

val hash_length : int

摘要的長度,以位元組為單位。

val compare : t -> t -> int

比較兩個摘要,具有與 compare 相同的規範。

val equal : t -> t -> bool

測試兩個摘要是否相等。

val string : string -> t

回傳給定字串的摘要。

val bytes : bytes -> t

回傳給定位元組序列的摘要。

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

substring s ofs len 回傳字串 s 從索引 ofs 開始,包含 len 個字元的子字串的摘要。

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

subbytes s ofs len 回傳位元組序列 s 從索引 ofs 開始,包含 len 個位元組的子序列的摘要。

val channel : in_channel -> int -> t

從通道讀取字元並回傳其摘要。 請參閱 Digest.channel 以取得完整規範。

val file : string -> t

回傳給定名稱的檔案的摘要。

val output : out_channel -> t -> unit

將摘要寫入給定的輸出通道。

val input : in_channel -> t

從給定的輸入通道讀取摘要。

val to_hex : t -> string

回傳給定摘要的可列印十六進制表示法。

val of_hex : string -> t

將十六進制表示法轉換回對應的摘要。