mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-24 11:42:51 +01:00
utils: add a simple P10 UID generator (#87)
Reference: https://github.com/evilnet/nefarious2/blob/a29b631/doc/p10.txt#L85-L92
This commit is contained in:
parent
e2edc68fe8
commit
dc1d9602e9
8
utils.py
8
utils.py
@ -90,6 +90,14 @@ class TS6UIDGenerator(IncrementalUIDGenerator):
|
||||
self.length = 6
|
||||
super().__init__(sid)
|
||||
|
||||
class P10UIDGenerator(IncrementalUIDGenerator):
|
||||
"""Implements an incremental P10 UID Generator."""
|
||||
|
||||
def __init__(self, sid):
|
||||
self.allowedchars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789[]'
|
||||
self.length = 3
|
||||
super().__init__(sid)
|
||||
|
||||
class TS6SIDGenerator():
|
||||
"""
|
||||
TS6 SID Generator. <query> is a 3 character string with any combination of
|
||||
|
Loading…
Reference in New Issue
Block a user