Hacl: expose hashing constants

This commit is contained in:
Vincent Bernardoff 2018-07-02 10:42:53 +02:00 committed by Grégoire Henry
parent 1a93df75ae
commit a3cfcc091a
No known key found for this signature in database
GPG Key ID: 50D984F20BD445D2
2 changed files with 12 additions and 0 deletions

View File

@ -50,6 +50,10 @@ module Hash = struct
mutable pos : int ;
}
let bytes = S.bytes
let blockbytes = S.blockbytes
let statebytes = S.statebytes
let init () =
let state = Bigstring.create S.statebytes in
let buf = Bigstring.create S.blockbytes in

View File

@ -31,6 +31,10 @@ module Hash : sig
module SHA256 : sig
type state
val bytes : int
val blockbytes : int
val statebytes : int
(** Incremental Interface *)
val init : unit -> state
@ -54,6 +58,10 @@ module Hash : sig
module SHA512 : sig
type state
val bytes : int
val blockbytes : int
val statebytes : int
(** Incremental Interface *)
val init : unit -> state