HexaDecimal unique key generator

Can anyone tell me how to generate unique key hexa decimal generation code.