diff --git a/src/binary_formats.ml b/src/binary_formats.ml index 94962fda..a16aadb5 100644 --- a/src/binary_formats.ml +++ b/src/binary_formats.ml @@ -217,7 +217,8 @@ module GNUNET_RsaPublicKey = struct e: Z.t; } - (* need to strip leading zeros or something? *) + (* todo: need to strip leading zeros or something? *) + (* Z.to_bits is in little endian but we need it in big endian *) let z_to_bigendian_bits v = let s = Z.to_bits v in let len = String.length s in @@ -240,9 +241,8 @@ module GNUNET_RsaPublicKey = struct { header; n; e }) |+ field header_bin (fun t -> t.header) (* TODO - Z.to_bits is in little endian but we need it in big endian *) - (* TODO - here it should not be [cstring] but [bytes t.header.n_len] *) + here it should not be [cstring] but [bytes t.header.n_len] + -> just parse this without Bin *) |+ field cstring (fun t -> z_to_bigendian_bits t.n) |+ field cstring (fun t -> z_to_bigendian_bits t.e) |> sealr