Encapsulates storage of an Ed25519KeyPair in a filesystem. More...
#include <DwmCredenceKeyStash.hh>
Public Member Functions | |
| KeyStash (const std::string &dirName="~/.credence") | |
Construct from the given dirName, which is the directory where the keys will be stored. | |
| const std::string & | DirName () const |
| Returns the directory where the keys are stored. | |
| bool | Save (const Ed25519KeyPair &edkp) const |
| Saves the given keypair. | |
| bool | Get (Ed25519KeyPair &edkp) const |
Fetches the keypair from the key stash and stores it in edkp. | |
| bool | IsValid () const |
| Returns true if the key stash is valid, i.e. | |
Encapsulates storage of an Ed25519KeyPair in a filesystem.
This is used to hold a single keypair for a user.
| bool Dwm::Credence::KeyStash::Get | ( | Ed25519KeyPair & | edkp | ) | const |
Fetches the keypair from the key stash and stores it in edkp.
Returns true on success, false on failure.
| bool Dwm::Credence::KeyStash::IsValid | ( | ) | const |
Returns true if the key stash is valid, i.e.
contains a valid keypair. Note this is just a convenience: it calls Get(Ed25519KeyPair &) and then on successs it calls IsValid() on the retrieved Ed25519KeyPair.
| bool Dwm::Credence::KeyStash::Save | ( | const Ed25519KeyPair & | edkp | ) | const |
Saves the given keypair.
Returns true on success, false on failure.