added generic implementation helpers for private_key_t.equals/belongs_to, public_key_t.equals

This commit is contained in:
Martin Willi
2009-08-26 11:23:52 +02:00
parent 0dd2defc5a
commit edd354db6f
4 changed files with 97 additions and 3 deletions
@@ -112,9 +112,27 @@ struct private_key_t {
private_key_t* (*get_ref)(private_key_t *this);
/**
* Decrease refcount, destroy private_key if no more references.
*/
void (*destroy)(private_key_t *this);
* Decrease refcount, destroy private_key if no more references.
*/
void (*destroy)(private_key_t *this);
};
/**
* Generic private key equals() implementation, usable by implementors.
*
* @param this first key to compare
* @param other second key to compare
* @return TRUE if this is equal to other
*/
bool private_key_equals(private_key_t *this, private_key_t *other);
/**
* Generic private key belongs_to() implementation, usable by implementors.
*
* @param this first key to compare
* @param other second key to compare
* @return TRUE if this is equal to other
*/
bool private_key_belongs_to(private_key_t *private, public_key_t *public);
#endif /** PRIVATE_KEY_H_ @}*/