Code extracted from: https://github.com/rhash/rhash.git at commit d839a1a853f22b8cfd26c2006ee5481739ea1114 (master).