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:
drbob 2012-11-05 22:28:08 +00:00
parent e803b2c447
commit 17e42f1ceb
5 changed files with 736 additions and 203 deletions

View file

@ -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] ;
};