-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
If you need TLS you can terminate it outside of the runtime. This will help us drop a bunch of dependencies too. Also get rid of Cstruct.
- Loading branch information
Showing
11 changed files
with
11 additions
and
504 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,5 @@ _opam | |
.direnv | ||
result | ||
.envrc | ||
dune.lock | ||
dev-tools.locks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,16 @@ | ||
let () = Mirage_crypto_rng_unix.initialize (module Mirage_crypto_rng.Fortuna) | ||
|
||
module Random = struct | ||
let cstruct n = Mirage_crypto_rng.generate n | ||
let cstruct_to_string n = Mirage_crypto_rng.generate n |> Cstruct.to_string | ||
let int8 () = Randomconv.int8 cstruct_to_string | ||
let int16 () = Randomconv.int16 cstruct_to_string | ||
let int32 () = Randomconv.int32 cstruct_to_string | ||
let int64 () = Randomconv.int64 cstruct_to_string | ||
let string = Mirage_crypto_rng.generate | ||
let int8 () = Randomconv.int8 string | ||
let int16 () = Randomconv.int16 string | ||
let int32 () = Randomconv.int32 string | ||
let int64 () = Randomconv.int64 string | ||
let char () = Char.chr (int8 ()) | ||
let int ?max () = Randomconv.int ?bound:max cstruct_to_string | ||
let float ?max () = Randomconv.float ?bound:max cstruct_to_string | ||
let bytes n = cstruct n |> Cstruct.to_bytes | ||
let bigarray n = cstruct n |> Cstruct.to_bigarray | ||
let string n = cstruct n |> Cstruct.to_string | ||
let int ?max () = Randomconv.int ?bound:max string | ||
let float ?max () = Randomconv.float ?bound:max string | ||
let bytes n = string n |> Bytes.unsafe_of_string | ||
let bytestring n = string n |> Bytestring.of_string | ||
let alphanum () = Char.chr (48 + Randomconv.int ~bound:74 cstruct_to_string) | ||
let alphanum () = Char.chr (48 + Randomconv.int ~bound:74 string) | ||
let seq n gen = List.init n (fun _ -> gen ()) |> List.to_seq |> String.of_seq | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
global | ||
logger | ||
riot_runtime | ||
tls | ||
bytestring | ||
telemetry | ||
randomconv | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.