Permalink
Browse files

Require at least one secret

  • Loading branch information...
1 parent 128bc70 commit a8b18407d10d10635b5bd014972bd5beed7fad86 @andrenth committed Jul 27, 2012
Showing with 3 additions and 2 deletions.
  1. +2 −1 lib/SRS.ml
  2. +1 −1 lib/SRS.mli
View
@@ -21,9 +21,10 @@ 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 secrets max_age hash_len sep =
+let make (secret, secrets) max_age hash_len sep =
let srs = create () in
set_separator srs sep;
set_hash_length srs hash_len;
+ add_secret srs secret;
List.iter (add_secret srs) secrets;
srs
View
@@ -19,4 +19,4 @@ val get_no_forward : t -> bool
val set_no_reverse : t -> bool -> unit
val get_no_reverse : t -> bool
-val make : string list -> int -> int -> char -> t
+val make : string * string list -> int -> int -> char -> t

0 comments on commit a8b1840

Please sign in to comment.