Browse Source

ft:函数添加

master
SisMaker 4 years ago
parent
commit
4b4c96d3cb
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      src/uuid/utUuid.erl

+ 5
- 0
src/uuid/utUuid.erl View File

@ -4,6 +4,7 @@
randStr/1 %%
, uuid/0 %% UUID
, uuidHex/0 %% hex格式的唯一UUID
, uuidHexBin/0
]).
-spec randStr(integer()) -> string().
@ -28,3 +29,7 @@ uuid() ->
-spec uuidHex() -> binary().
uuidHex() ->
utMd5:getMd5Hex(term_to_binary({erlang:system_time(nanosecond), rand:uniform(134217727), make_ref()})).
-spec uuidHexBin() -> binary().
uuidHexBin() ->
utMd5:getMd5HexBin(term_to_binary({erlang:system_time(nanosecond), rand:uniform(134217727), make_ref()})).

Loading…
Cancel
Save