Function dupPassword

This function exists as a convenience in case you need it, HOWEVER it's recommended to design your code so you DON'T need to use this (use toPassword instead):

Using this to create a Password cannot protect the in-memory data of your original string because a string's data is immutable (this function must .dup the memory).

While immutability usually improves safety, you should avoid ever storing unhashed passwords in immutables because they cannot be reliably zero-ed out.

Prototype

std.typecons.RefCounted!(dauth.core.PasswordData) dupPassword(
  string password
);

Authors

Copyright

License