in reply to Question: methods to transfer a long hexadicimal into shorter string
Is there any reason why you need human-readable unique keys? Why not pack the key as a binary string using pack() while you're at it?