Using Parts of GUID as ID

后端 未结 6 761
借酒劲吻你
借酒劲吻你 2021-01-18 21:40

I\'m developing an ASP .Net MVC application. One of my actions requires id as a parameter. For example:

public actionresult Detail(Guid id){
            


        
6条回答
  •  星月不相逢
    2021-01-18 22:16

    No, it's not safe.

    You can calculate a SHA-2 hash of it though, and take the first few characters of that.

提交回复
热议问题