BinaryNinja::CoreSecretsProvider Class Reference

Public Member Functions

 CoreSecretsProvider (BNSecretsProvider *provider)
 
virtual bool HasData (const std::string &key) override
 Check if data for a specific key exists, but do not retrieve it. More...
 
virtual std::optional< std::string > GetData (const std::string &key) override
 Retrieve data for the given key, if it exists. More...
 
virtual bool StoreData (const std::string &key, const std::string &data) override
 Store data with the given key. More...
 
virtual bool DeleteData (const std::string &key) override
 Delete stored data with the given key. More...
 
virtual bool HasData (const std::string &key)=0
 Check if data for a specific key exists, but do not retrieve it. More...
 
virtual std::optional< std::string > GetData (const std::string &key)=0
 Retrieve data for the given key, if it exists. More...
 
virtual bool StoreData (const std::string &key, const std::string &data)=0
 Store data with the given key. More...
 
virtual bool DeleteData (const std::string &key)=0
 Delete stored data with the given key. More...
 
- Public Member Functions inherited from BinaryNinja::StaticCoreRefCountObject< BNSecretsProvider >
 StaticCoreRefCountObject ()
 
virtual ~StaticCoreRefCountObject ()
 
BNSecretsProvider * GetObject () const
 
void AddRef ()
 
void Release ()
 
void AddRefForRegistration ()
 

Additional Inherited Members

- Static Public Member Functions inherited from BinaryNinja::SecretsProvider
static std::vector< Ref< SecretsProvider > > GetList ()
 Retrieve the list of providers. More...
 
static Ref< SecretsProviderGetByName (const std::string &name)
 Retrieve a provider by name. More...
 
static void Register (SecretsProvider *provider)
 Register a new provider. More...
 
- Static Public Member Functions inherited from BinaryNinja::StaticCoreRefCountObject< BNSecretsProvider >
static BNSecretsProvider * GetObject (StaticCoreRefCountObject *obj)
 
- Public Attributes inherited from BinaryNinja::StaticCoreRefCountObject< BNSecretsProvider >
std::atomic< int > m_refs
 
BNSecretsProvider * m_object
 
- Protected Member Functions inherited from BinaryNinja::SecretsProvider
 SecretsProvider (const std::string &name)
 
 SecretsProvider (BNSecretsProvider *provider)
 
- Static Protected Member Functions inherited from BinaryNinja::SecretsProvider
static bool HasDataCallback (void *ctxt, const char *key)
 
static char * GetDataCallback (void *ctxt, const char *key)
 
static bool StoreDataCallback (void *ctxt, const char *key, const char *data)
 
static bool DeleteDataCallback (void *ctxt, const char *key)
 

Constructor & Destructor Documentation

◆ CoreSecretsProvider()

CoreSecretsProvider::CoreSecretsProvider ( BNSecretsProvider *  provider)

Member Function Documentation

◆ DeleteData()

bool CoreSecretsProvider::DeleteData ( const std::string &  key)
overridevirtual

Delete stored data with the given key.

Parameters
keyKey for data
Returns
True if it was deleted

Implements BinaryNinja::SecretsProvider.

◆ GetData()

std::optional< std::string > CoreSecretsProvider::GetData ( const std::string &  key)
overridevirtual

Retrieve data for the given key, if it exists.

Parameters
keyKey for data
Returns
Optional with data, if it exists, or empty optional if it does not exist or otherwise could not be retrieved.

Implements BinaryNinja::SecretsProvider.

◆ HasData()

bool CoreSecretsProvider::HasData ( const std::string &  key)
overridevirtual

Check if data for a specific key exists, but do not retrieve it.

Parameters
keyKey for data
Returns
True if data exists

Implements BinaryNinja::SecretsProvider.

◆ StoreData()

bool CoreSecretsProvider::StoreData ( const std::string &  key,
const std::string &  data 
)
overridevirtual

Store data with the given key.

Parameters
keyKey for data
dataData to store
Returns
True if the data was stored

Implements BinaryNinja::SecretsProvider.


The documentation for this class was generated from the following files: