Fix bug of encryption (check mac value) when some fields are not used.

Dynamically sort existing fields and connect them to string.
沒有使用原本規定的十欄或是十欄外的欄位會造成 check mac value 計算錯誤。