Botan

Global State Management

License
Botan is released under the Simplified BSD License (see LICENSE.md)

LibraryState  globalState();

Access the global library state

Returns
reference to the global library state

void  setGlobalState(LibraryState new_state);

Set the global state object

Parameters
LibraryState new_state the new global state to use

bool  setGlobalStateUnlessSet(LibraryState new_state);

Set the global state object unless it is already set

Parameters
LibraryState new_state the new global state to use
Returns
true if the state parameter is now being used as the global state, or false if one was already set, in which case the parameter was deleted immediately

Query if the library is currently initialized

Returns
true iff the library is initialized