6 lines
211 B
Python
6 lines
211 B
Python
|
from dbsettings.functions import getValue
|
||
|
|
||
|
import random
|
||
|
|
||
|
def generate_token(len=getValue("smsotp.length", 6), chars=getValue("smsotp.chars", "0123456789")):
|
||
|
return "".join(random.choices(chars, k=int(len)))
|