+
Skip to content

TypeRefHash Questions/Inconsistencies #219

@ddash-ct

Description

@ddash-ct

While attempting to review and leverage the TypeRefHash, we came across a few issues we would like to bring up and hopefully resolve through discussion/implementation:

  • Could you explicitly state the sort order in the definition of TypeRefHash? It seems the sort order is the default C# sort order, which may cause some problems as stated in subsequent bullets:
  • Since the C# default sort order is leveraged, the generated TypeRefHash may change based upon locality/language. For example, if the default language setting for a user is French, the generated TypeRefHash may be different than if the default language setting is English.
  • The C# default sort order treats some characters differently than, say, Python. Having a sorter which is language agnostic will better enable portability and implementation in other languages/environments.
  • The sort order is case-insensitive, while the hash is case-sensitive. The TypeRefHash can be defeated by altering the case of some of the strings. In comparison, an ImportHash converts all names to lower-case before both comparing and hashing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载