randomHex
此内容尚不支持你的语言。
randomHex(
length,exists?):string
Defined in: src/util/RandomString.ts:117
length lowercase hex characters.
Deliberately not a randomString flag combination — a–f is a subset
of the letters, not a class of its own. It is separate because W3C
trace-context mandates this alphabet: a traceparent header carries
[0-9a-f]{32} and [0-9a-f]{16}, and a peer rejects anything else.
exists is the optional collision check every helper here takes — draw again
while it answers true. See ExistsPredicate.
Parameters
Section titled “Parameters”length
Section titled “length”number
exists?
Section titled “exists?”Returns
Section titled “Returns”string
