• frezik
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    7 hours ago

    None of this has much to do with type safety at all. A dynamically typed language might have a Salt object that has a constructor that takes a base64 string. If its common uuid library doesn’t output base64, then you can’t use it directly.

    Nor does a specific uuid library matter much. It just needs to be able to output base64 strings, which is an uncommon uuid encoding, but it’s out there.

    Nor does type safety prevent providing a sensible default implementation.

    The crate uses phc strings, which store the salt together with the hashed password, so no, it can handle it all on its own.

    There was just no thought into how components work together.