zk-merkle-tree
zk-merkle-tree copied to clipboard
If a hashFn returns an odd length string, the buffer removes the last digit
My hash fn sometimes returns odd length strings and returns them as the hash of two leaves. Then behind the scenes this string probably gets turned to a buffer before it gets sent to the fn again. The problem is that a buffer from a hex string needs to be even in order to remain untouched. If its odd length it will remove the last digit. Is there a solution?