Command line GUID for Unix and Windows?

前端 未结 5 808
生来不讨喜
生来不讨喜 2020-12-30 23:47

Is there a command line tool for Unix and Windows that uses the same algorithm to create GUIDs for both platforms?

5条回答
  •  一个人的身影
    2020-12-31 00:28

    Something useful to know:

    The byte order of Guid.ToByteArray() in C# and the SQL Server GUID type is:

            { 3, 2, 1, 0, 5, 4, 7, 6, 8, 9, 10, 11, 12, 13, 14, 15 };
    

    An Oracle GUID created using SYS_GUID() and stored as RAW[16] is ordered:

            { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
    

    You may find this online GUID converter handy. I'm not sure if the source is available for your own use, but it shouldn't be too hard to figure it out.

提交回复
热议问题