diff options
| author | Marcos Magueta <maguetamarcos@gmail.com> | 2025-11-11 00:00:43 -0300 |
|---|---|---|
| committer | Marcos Magueta <maguetamarcos@gmail.com> | 2025-11-11 00:00:43 -0300 |
| commit | 3063608df6ff1668f683d9d22c57fea29d728d0d (patch) | |
| tree | 36be7f6c6d901c5984c045d4ce823bd24c37e9af /lib/interop.ml | |
| parent | b5dbdaa989a86477669aac0bf342029e1d2b6028 (diff) | |
| download | Sakura-3063608df6ff1668f683d9d22c57fea29d728d0d.tar.gz Sakura-3063608df6ff1668f683d9d22c57fea29d728d0d.zip | |
migrating to erlang to attach to mnesia
Diffstat (limited to '')
| -rw-r--r-- | lib/interop.ml | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/lib/interop.ml b/lib/interop.ml deleted file mode 100644 index 28b4fb9..0000000 --- a/lib/interop.ml +++ /dev/null @@ -1,22 +0,0 @@ -open Ctypes - -module Sha256 = struct - let compute_hash content = - let size_with_null_terminator = C.Types.hash_size + 1 in - let buf = Ctypes.allocate_n char ~count:size_with_null_terminator in - let () = C.Functions.compute_hash buf (Bytes.to_string content) in - Ctypes.coerce (ptr char) Ctypes.string buf -end - -module Merkle = struct - let merkle_generate_root hashes = - let size_with_null_terminator = C.Types.hash_size + 1 in - let buf = Ctypes.allocate_n char ~count:size_with_null_terminator in - let len = List.length hashes in - let hashes = CArray.of_list string hashes in - C.Functions.merkle_generate_root (CArray.start hashes) len buf; - Ctypes.coerce (ptr char) Ctypes.string buf - - let register_to_merkle content = - C.Functions.register_to_merkle "/tmp/relational-engine/tree" content -end |
