3 ms·
> The ROTL macro is missing It's missing in the landing page, but the paper [1] linked at the bottom of it provides two implementations: // C #define ROTL
by ziotom78 7y ago
> The ROTL macro is missing
It's missing in the landing page, but the paper [1] linked at the bottom of it provides two implementations:
// C
#define ROTL(d,lrot) ((d<<(lrot)) | (d>>(8*sizeof(d)-(lrot))))
// C++
template <class uDataT>
inline uDataT rotl (uDataT d, unsigned lrot) {
return (d<<lrot) | (d>>(8*sizeof(d)-lrot));
}
[1] http://www.romu-random.org/romupaper.pdf http://www.romu-random.org/romupaper.pdf