SRP-6a Secure Remote Password protocol for OCaml
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

srp, freebox: Use open Result.Syntax instead of local let*

+2 -2
+2 -2
lib/srp.ml
··· 18 18 hardware security modules or ensuring operations occur on trusted networks 19 19 only. *) 20 20 21 + open Result.Syntax 22 + 21 23 (** {1 Constants} *) 22 24 23 25 (** RFC 5054 3072-bit group prime N *) ··· 111 113 let public_key t = t.big_a 112 114 113 115 let compute_session_key t ~salt ~big_b = 114 - let ( let* ) = Result.bind in 115 116 let* () = 116 117 if Z.(equal (big_b mod n) zero) then Error (`Msg "Invalid B value") 117 118 else Ok () ··· 164 165 let salt t = t.salt 165 166 166 167 let compute_session_key t ~big_a = 167 - let ( let* ) = Result.bind in 168 168 let* () = 169 169 if Z.(equal (big_a mod n) zero) then Error (`Msg "Invalid A value") 170 170 else Ok ()