Skip to content
Snippets Groups Projects
Commit 72a43e82 authored by Anders H. Rebner's avatar Anders H. Rebner
Browse files

Merge branch 'modul-autentifiseringstavle' of...

Merge branch 'modul-autentifiseringstavle' of https://gitlab.stud.idi.ntnu.no/bachelor-paa-bittet/soitool into modul-autentifiseringstavle
parents 4f372870 aeb5a151
No related branches found
No related tags found
1 merge request!50#86 Modul: Autentiseringstavle
......@@ -18,7 +18,8 @@ def get_code(code_length, mode="ascii", space_interval=0):
'ascii' for letters, 'digits' for digits and 'combo' for
combination of letters and digits, by default 'ascii'.
space_interval : int
Spaces will be inserted to code each interval if not 0, by default 0.
Spaces will be inserted into code each interval for readability if not
0, by default 0.
Return
------
......@@ -71,7 +72,8 @@ def get_code_set(count, code_length, mode="ascii", space_interval=0):
'ascii' for letters (default), 'digits' for digits and 'combo'
for combination of letters and digits.
space_interval : int
Spaces will be inserted to code each interval if not 0, by default 0.
Spaces will be inserted into code each interval for readability if not
0, by default 0.
Return
------
......
......@@ -13,12 +13,18 @@ from soitool.modules.module_base import (
START_NO_OF_AUTHENTICATION_CODES = 10
CODE_LENGTH = 25
CODE_CHARACTERS = "ascii" # Has to be 'ascii', 'digits' or 'combo'
# Codes will consist of A-Z if 'ascii', 0-9 if 'digits' and A-Z+0-9 if 'combo'.
ROW_IDENTIFIERS = string.ascii_uppercase # Characters for first column,
# it's length determines maximum number of codes (rows).
SPACE_INTERVAL = 5 # Adds space between sets of characters, 0 => no spaces
# Has to be 'ascii', 'digits' or 'combo'. Codes will consist of A-Z if
# 'ascii', 0-9 if 'digits' and A-Z+0-9 if 'combo'.
CODE_CHARACTERS = "ascii"
# Characters for first column. It's length determines maximum number of
# codes (rows).
ROW_IDENTIFIERS = string.ascii_uppercase
# Adds space between sets of characters, 0 => no spaces
# If code is 123456 and interval is 2, code will be 12 34 56
SPACE_INTERVAL = 5
HEADLINE_TEXT = "Autentiseringstavle"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment