2026-02-20 11:07:42 +09:00
|
|
|
export const NIBBLE_STR = "ZPMQVRWSNKTXJBYH"
|
2026-02-16 15:59:12 +09:00
|
|
|
|
2026-02-20 11:07:42 +09:00
|
|
|
export const HASHLINE_DICT = Array.from({ length: 256 }, (_, i) => {
|
|
|
|
|
const high = i >>> 4
|
|
|
|
|
const low = i & 0x0f
|
|
|
|
|
return `${NIBBLE_STR[high]}${NIBBLE_STR[low]}`
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
export const HASHLINE_REF_PATTERN = /^([0-9]+)#([ZPMQVRWSNKTXJBYH]{2})$/
|
|
|
|
|
export const HASHLINE_OUTPUT_PATTERN = /^([0-9]+)#([ZPMQVRWSNKTXJBYH]{2}):(.*)$/
|
2026-02-21 05:59:30 +09:00
|
|
|
export const HASHLINE_LEGACY_REF_PATTERN = /^([0-9]+):([0-9a-fA-F]{2,})$/
|