mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 14:16:16 -04:00
Added core code for pgphash calculations.
- Reworked GxsIdGroup members... moved IdType -> groupFlags, so Hash & Sign are only ones. - Reworked GroupServiceString storage. - Added core processing functions - yet to test! git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5777 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
e803b2c447
commit
17e42f1ceb
5 changed files with 736 additions and 203 deletions
|
@ -25,6 +25,9 @@
|
|||
// Warning: never store references to a t_RsGenericIdType accross threads, since the
|
||||
// cached string convertion is not thread safe.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
|
@ -60,6 +63,14 @@ template<uint32_t ID_SIZE_IN_BYTES> class t_RsGenericIdType
|
|||
return !operator==(fp) ;
|
||||
}
|
||||
|
||||
bool operator<(const t_RsGenericIdType<ID_SIZE_IN_BYTES>& fp) const
|
||||
{
|
||||
for(uint32_t i=0;i<ID_SIZE_IN_BYTES;++i)
|
||||
if(fp.bytes[i] != bytes[i])
|
||||
return (bytes[i] < fp.bytes[i]);
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
unsigned char bytes[ID_SIZE_IN_BYTES] ;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue