diff options
Diffstat (limited to 'include/keymaster')
-rw-r--r-- | include/keymaster/authorization_set.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/keymaster/authorization_set.h b/include/keymaster/authorization_set.h index 5f0f8c3..74daa8d 100644 --- a/include/keymaster/authorization_set.h +++ b/include/keymaster/authorization_set.h @@ -118,6 +118,11 @@ class AuthorizationSet : public Serializable, public keymaster_key_param_set_t { size_t size() const { return elems_size_; } /** + * Returns true if the set is empty. + */ + bool empty() const { return size() == 0; } + + /** * Returns the total size of all indirect data referenced by set elements. */ size_t indirect_size() const { return indirect_data_size_; } @@ -152,6 +157,12 @@ class AuthorizationSet : public Serializable, public keymaster_key_param_set_t { int find(keymaster_tag_t tag, int begin = -1) const; /** + * Removes the entry at the specified index. Returns true if successful, false if the index was + * out of bounds. + */ + bool erase(size_t index); + + /** * Returns iterator (pointer) to beginning of elems array, to enable STL-style iteration */ const keymaster_key_param_t* begin() const { return elems_; } |