mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-26 16:05:48 -04:00
Safer rsids API
Deprecate unsafe costructor, substituted by fromBufferUnsafe which explicitely marked suggest the caller to pay attention. Use enum class for id types instead of constants Make size constants more private Use internal Id_t alias to avoid huge template lines Remove and deprecate oguly names in favor of consistent names
This commit is contained in:
parent
ccf7dc24b8
commit
7642216912
12 changed files with 337 additions and 267 deletions
|
@ -47,10 +47,10 @@ namespace librs
|
|||
|
||||
template<class T> friend HashStream& operator<<(HashStream& u, const T&) ;
|
||||
|
||||
template<uint32_t ID_SIZE_IN_BYTES,bool UPPER_CASE,uint32_t UNIQUE_IDENTIFIER>
|
||||
friend HashStream& operator<<(HashStream& u,const t_RsGenericIdType<ID_SIZE_IN_BYTES,UPPER_CASE,UNIQUE_IDENTIFIER>& r)
|
||||
template<uint32_t ID_SIZE_IN_BYTES, bool UPPER_CASE, RsGenericIdType UNIQUE_IDENTIFIER>
|
||||
friend HashStream& operator<<(HashStream& u, const t_RsGenericIdType<ID_SIZE_IN_BYTES,UPPER_CASE,UNIQUE_IDENTIFIER>& r)
|
||||
{
|
||||
EVP_DigestUpdate(u.mdctx,r.toByteArray(),ID_SIZE_IN_BYTES);
|
||||
EVP_DigestUpdate(u.mdctx, r.toByteArray(), ID_SIZE_IN_BYTES);
|
||||
return u;
|
||||
}
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue