Encode guid