x11 hashing function for node.js