ds: template .ipp file for optimized hashing function

TBD
 - include random-numbers
 - fold arguments using described transformation
 - proceed as normal