One caveat:

What about the stringified LENGTH in the format HASH-F-LENGTH-L?  Will this handle said case appropriately?