Commit 08d891b6 authored by Stephane Glondu's avatar Stephane Glondu

Add Platform.debug

parent 493a638c
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
(* <http://www.gnu.org/licenses/>. *) (* <http://www.gnu.org/licenses/>. *)
(**************************************************************************) (**************************************************************************)
val debug : string -> unit
val sha256_hex : string -> string val sha256_hex : string -> string
val sha256_b64 : string -> string val sha256_b64 : string -> string
val pbkdf2_hex : iterations:int -> salt:string -> string -> string val pbkdf2_hex : iterations:int -> salt:string -> string -> string
......
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
open Js_of_ocaml open Js_of_ocaml
let debug x = Firebug.console##log (Js.string x)
module Sjcl = struct module Sjcl = struct
open Js open Js
......
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
(* <http://www.gnu.org/licenses/>. *) (* <http://www.gnu.org/licenses/>. *)
(**************************************************************************) (**************************************************************************)
let debug x = prerr_endline x
let sha256_hex x = Cryptokit.(x |> let sha256_hex x = Cryptokit.(x |>
hash_string (Hash.sha256 ()) |> hash_string (Hash.sha256 ()) |>
transform_string (Hexa.encode ()) transform_string (Hexa.encode ())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment