Named collection of Password objects.
More...
#include <StormByte/crypto/secure/vault.hxx>
|
| void | Store (std::string_view name, Password password) noexcept |
| | Store or overwrite a named password.
|
| |
| ExpectedPassword | Get (std::string_view name) const noexcept |
| | Look up a password.
|
| |
| bool | Contains (std::string_view name) const noexcept |
| | Whether a name exists.
|
| |
| void | Remove (std::string_view name) noexcept |
| | Drop one password.
|
| |
| void | Clear () noexcept |
| | Drop every password.
|
| |
| StormByte::Size | Size () const noexcept |
| | Number of stored passwords.
|
| |
| bool | Empty () const noexcept |
| | Whether the vault is empty.
|
| |
|
| | Vault ()=default |
| | Empty vault.
|
| |
| | Vault (const Vault &)=delete |
| |
| | Vault (Vault &&other) noexcept |
| | Move constructor.
|
| |
| | ~Vault () noexcept |
| | Destructor.
|
| |
| Vault & | operator= (const Vault &)=delete |
| |
| Vault & | operator= (Vault &&other) noexcept |
| | Move assignment.
|
| |
Named collection of Password objects.
Move-only. Destroying the vault, or calling Clear()/Remove(), drops the last owner of each password and triggers the wipe.
◆ Vault() [1/3]
| StormByte::Crypto::Secure::Vault::Vault |
( |
| ) |
|
|
default |
◆ Vault() [2/3]
| StormByte::Crypto::Secure::Vault::Vault |
( |
const Vault & |
| ) |
|
|
delete |
◆ Vault() [3/3]
| StormByte::Crypto::Secure::Vault::Vault |
( |
Vault && |
other | ) |
|
|
noexcept |
Move constructor.
- Parameters
-
◆ ~Vault()
| StormByte::Crypto::Secure::Vault::~Vault |
( |
| ) |
|
|
noexcept |
Destructor.
Releases every stored password.
◆ Clear()
| void StormByte::Crypto::Secure::Vault::Clear |
( |
| ) |
|
|
noexcept |
◆ Contains()
| bool StormByte::Crypto::Secure::Vault::Contains |
( |
std::string_view |
name | ) |
const |
|
noexcept |
Whether a name exists.
- Parameters
-
- Returns
- true if present.
◆ Empty()
| bool StormByte::Crypto::Secure::Vault::Empty |
( |
| ) |
const |
|
noexcept |
Whether the vault is empty.
- Returns
- true if Size() is 0.
◆ Get()
| ExpectedPassword StormByte::Crypto::Secure::Vault::Get |
( |
std::string_view |
name | ) |
const |
|
noexcept |
Look up a password.
- Parameters
-
- Returns
- Password, or an error if the name is missing.
- Note
- The returned Password shares the buffer.
◆ operator=() [1/2]
| Vault & StormByte::Crypto::Secure::Vault::operator= |
( |
const Vault & |
| ) |
|
|
delete |
◆ operator=() [2/2]
| Vault & StormByte::Crypto::Secure::Vault::operator= |
( |
Vault && |
other | ) |
|
|
noexcept |
Move assignment.
- Parameters
-
- Returns
- Reference to this vault.
◆ Remove()
| void StormByte::Crypto::Secure::Vault::Remove |
( |
std::string_view |
name | ) |
|
|
noexcept |
Drop one password.
- Parameters
-
◆ Size()
Number of stored passwords.
- Returns
- Count.
◆ Store()
| void StormByte::Crypto::Secure::Vault::Store |
( |
std::string_view |
name, |
|
|
Password |
password |
|
) |
| |
|
noexcept |
Store or overwrite a named password.
- Parameters
-
| name | Identifier. |
| password | Password to share. |
The documentation for this class was generated from the following file: