Alias Password

A reference-counted type for passwords. The memory containing the password is automatically zeroed-out when there are no more references or when a new password is assigned.

If you keep any direct references to Password.data, be aware it may get cleared.

Create a Password via functions 'toPassword' or 'dupPassword'.

The payload is a private struct that supports the following:

@property ubyte[] data(): Retrieve the actual plaintext password

@property size_t length() const: Retrieve the password length

void opAssign(PasswordData rhs): Assignment

void opAssign(ubyte[] rhs): Assignment

~this(): Destructor

Declaration

module dauth.core;

// ...
alias Password = std.typecons.RefCounted!(dauth.core.PasswordData);
// ...

Authors

Copyright

License