identification: Add hash() method
Compared to hashing the encoding we can ignore string types of RDNs when hashing DNs, making hash() compatible to equals() that does the same. Fixes #991.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2009 Tobias Brunner
|
||||
* Copyright (C) 2009-2015 Tobias Brunner
|
||||
* Copyright (C) 2005-2009 Martin Willi
|
||||
* Copyright (C) 2005 Jan Hutter
|
||||
* Hochschule fuer Technik Rapperswil
|
||||
@@ -218,6 +218,14 @@ struct identification_t {
|
||||
*/
|
||||
id_type_t (*get_type) (identification_t *this);
|
||||
|
||||
/**
|
||||
* Create a hash value for this identification_t object.
|
||||
*
|
||||
* @param inc optional value for incremental hashing
|
||||
* @return hash value
|
||||
*/
|
||||
u_int (*hash) (identification_t *this, u_int inc);
|
||||
|
||||
/**
|
||||
* Check if two identification_t objects are equal.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user