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:
Gioacchino Mazzurco 2019-04-28 18:10:17 +02:00
parent ccf7dc24b8
commit 7642216912
No known key found for this signature in database
GPG key ID: A1FBCA3872E87051
12 changed files with 337 additions and 267 deletions

View file

@ -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: