仅生成8个字符的UUID [英] Generating 8-character only UUIDs

查看:295
本文介绍了仅生成8个字符的UUID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

UUID库生成32个字符的UUID。

UUID libraries generate 32-character UUIDs.

我想生成仅8个字符的UUID,是否可能?

I want to generate 8-character only UUIDs, is it possible?

推荐答案

这是不可能的,因为UUID是每个定义的16字节数。但当然,你可以生成8个字符长的唯一字符串(参见其他答案)。

It is not possible since a UUID is a 16-byte number per definition. But of course, you can generate 8-character long unique strings (see the other answers).

还要小心生成更长的UUID并对它们进行子串,因为ID的某些部分可能包含固定的字节(例如,这是MAC,DCE和MD5 UUID的情况)。

Also be careful with generating longer UUIDs and substring-ing them, since some parts of the ID may contain fixed bytes (e.g. this is the case with MAC, DCE and MD5 UUIDs).

这篇关于仅生成8个字符的UUID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆