Dont return random key as hex string. Format it in generate_key() instead.