문제

Python:

Just out of curosity I was thinking that combinations which uuid4 or uuid6 can provide - shortuuid may fail and may run out of the combinations. Am I correct or have I understood the concept wrong?

Which one is better to use? I know that shortuuid provides url friendly url(as documented on their github page)

도움이 되었습니까?

해결책

A UUID is just a 128-bit number. They're usually expressed in base-16, but shortuuid uses base-57. The UUIDs are generated with either uuid.uuid4 or uuid.uuid5, so you're storing exactly the same information.

Look at the source code.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top