Commit a3dea639 authored by Nathan/Eilisha Shiraini's avatar Nathan/Eilisha Shiraini
Browse files

Added front padding

parent b99ac773
......@@ -135,7 +135,11 @@ class AztecBuilder(object):
raise ValueError("Data too large")
wordcount = (len(stuffed), (sizes.COMPACT_WORD_COUNT[layers] if compact else sizes.FULL_WORD_COUNT[layers]) - len(stuffed))
rscode = sizes.GALLOIS_FIELD_FOR_LAYERS[layers].gen_rs_code(stuffed, wordcount[1])
result = list(reedsolomon.fromwords(stuffed + rscode, wordsize))
if compact:
pad = ((88 + 16 * layers) * layers) % wordsize
else:
pad = ((112 + 16 * layers) * layers) % wordsize
result = ([False] * pad) + list(reedsolomon.fromwords(stuffed + rscode, wordsize))
return result, layers, compact, wordcount
@staticmethod
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment