1. A device effective to generate a hash of a string, the device comprising: a memory, wherein the memory is effective to include a first function, a first list of first monoid elements, and an initial monoid element; a processor configured to be in communication with the memory, a decomposition module, a monoid list module, and a set of function modules that includes at least a first function module and a second function module; the decomposition module, when implemented with the processor, is effective to receive the string and divide the string into a sequence of blocks; the monoid list module in communication with the decomposition module and the memory, the monoid list module, when implemented with the processor, is effective to receive the sequence of blocks from the decomposition module, and in response, associate blocks in the sequence of blocks with respective monoid elements in the first list of first monoid elements to produce a second list of second monoid elements; the first function module in communication with the monoid list module and with the memory, the first function module, when implemented with the processor, is effective to: receive a first one of the second monoid elements from the monoid list module, receive the initial monoid element, receive the first function, apply the first function to the initial monoid element and the first one of the second monoid elements to produce a first calculated monoid element, and evaluate an action of the initial monoid element on the first function to produce a second function; the second function module in communication with the monoid list module and the first function module, the second function module, when implemented with the processor, is effective to: receive a second one of the second monoid elements from the monoid list module, receive the first calculated monoid element from the first function module, receive the second function from the first function module, and apply the second function to the first calculated monoid element and to the second one of the second monoid elements to produce a second calculated monoid element.