Why are you using D instead of Rust?
ag0aep6g
anonymous at example.com
Sat Oct 23 11:36:58 UTC 2021
On 23.10.21 09:53, jfondren wrote:
> bool encryptsTo(const(char)* key, const(char)* salt, const(char)* hash)
> @trusted {
> import std.string : fromStringz;
>
> return hash.fromStringz == crypt(key, salt).fromStringz;
> }
That function can't be @trusted. "Any function that traverses a C string
passed as an argument can only be @system."
https://dlang.org/spec/function.html#safe-interfaces
More information about the Digitalmars-d
mailing list