def _hash(x, elementType, relicHashFunc):
<EOL>barray = bytearray()<EOL>map(barray.extend, bytes(x))<EOL>result = elementType()<EOL>buf = getBuffer(barray)<EOL>relicHashFunc(byref(result), byref(buf), sizeof(buf))<EOL>return result<EOL>
Hash an array of bytes, @x, using @relicHashFunc and returns the result
of @elementType.