How to generate a new GUID?

前端 未结 6 1357
不知归路
不知归路 2020-11-29 02:15

I\'m working on a web service which requires a new GUID() passed as a reference to a method within the service.

I am not familiar with C#

6条回答
  •  伪装坚强ぢ
    2020-11-29 03:01

    As an alternative to the above options:

    $guid = bin2hex(openssl_random_pseudo_bytes(16));
    

    It gives a string like 412ab7489d8b332b17a2ae127058f4eb

提交回复
热议问题