Skip to content

Invalid use should raise an error #27

@burgerdev

Description

@burgerdev

I just managed to confuse the input type, it would have been helpful if this were not accepted:

let _ =
  let pub = X25519.(base |> string_of_public_key) in
  let priv = "0123456789abcdef0123456789abcdef" in (* <-- note that this should be 64 hex characters, not 32 octets! *)
  let pub = x25519 ~priv ~pub in
  print_endline pub
  (* happily prints 633d0241b2d1519ecfc84b75e1520e01fed24538f36b2d26f939ddd1f1efd73d *)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions