MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / encodeBase32

Function encodeBase32

apps/kimi-web/src/api/daemon/http.ts:38–46  ·  view source on GitHub ↗
(value: number, length: number)

Source from the content-addressed store, hash-verified

36}
37
38function encodeBase32(value: number, length: number): string {
39 let out = '';
40 let next = value;
41 for (let i = 0; i < length; i++) {
42 out = ULID_ALPHABET[next % 32] + out;
43 next = Math.floor(next / 32);
44 }
45 return out;
46}
47
48function randomBase32(length: number): string {
49 const bytes = new Uint8Array(length);

Callers 1

createRequestIdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected