summaryrefslogtreecommitdiff
path: root/sid.ml
diff options
context:
space:
mode:
Diffstat (limited to 'sid.ml')
-rw-r--r--sid.ml22
1 files changed, 3 insertions, 19 deletions
diff --git a/sid.ml b/sid.ml
index bd8f9fb..f3fb77d 100644
--- a/sid.ml
+++ b/sid.ml
@@ -21,6 +21,9 @@ let create ?(sa=[||]) ia =
if Array.length sa > max_subauth_count then None else
Some (create_unsafe sa ia)
+let get_ident_auth s = s.sid_ident_auth
+let get_sub_auths s = s.sid_sub_auths
+
exception Nope
let equal_sub_auths saa sab =
@@ -36,25 +39,6 @@ let equal a b =
&& Array.length a.sid_sub_auths = Array.length b.sid_sub_auths
&& equal_sub_auths a.sid_sub_auths b.sid_sub_auths
-module type Xtract = sig
- type t
- val nth_byte : t -> int -> int
-end
-
-module MkExtract (INTTYPE : Stdint.Int) = struct
- type t = INTTYPE.t
-
- let ilsr = INTTYPE.shift_left
- let iland = INTTYPE.logand
- let ixff = INTTYPE.of_string "255"
-
- let nth_byte n i =
- (ilsr n i) |> iland ixff |> INTTYPE.to_int
-end
-
-module U32Extract = MkExtract (U32)
-module U64Extract = MkExtract (U64)
-
module StringFmt = struct
let expect_char s c p =