Skip to content
Browse files

Add SRS.make

  • Loading branch information...
1 parent 242507d commit 2f0595af5d347cc549743f26c257a4912ab2bc7e @andrenth committed Jul 10, 2012
Showing with 9 additions and 0 deletions.
  1. +7 −0 lib/SRS.ml
  2. +2 −0 lib/SRS.mli
View
7 lib/SRS.ml
@@ -25,3 +25,10 @@ external set_no_forward : t -> bool -> unit = "caml_srs_set_noforward"
external get_no_forward : t -> bool = "caml_srs_get_noforward"
external set_no_reverse : t -> bool -> unit = "caml_srs_set_noreverse"
external get_no_reverse : t -> bool = "caml_srs_get_noreverse"
+
+let make secret max_age hash_len sep =
+ let srs = create () in
+ set_separator srs sep;
+ set_hash_length srs hash_len;
+ add_secret srs secret;
+ srs
View
2 lib/SRS.mli
@@ -23,3 +23,5 @@ val set_no_forward : t -> bool -> unit
val get_no_forward : t -> bool
val set_no_reverse : t -> bool -> unit
val get_no_reverse : t -> bool
+
+val make : string -> int -> int -> separator -> t

0 comments on commit 2f0595a

Please sign in to comment.
Something went wrong with that request. Please try again.