Update qrt.

This commit is contained in:
Michael Zhang 2017-03-07 18:33:17 -06:00
parent 38f3622525
commit 98e4209e39
3 changed files with 2 additions and 2 deletions

View file

@ -305,7 +305,7 @@ def generate_image(string, debug=False):
draw_triangle(im, points, cell, size)
return im
FLAG = "are_triangles_more_secure_than_squares?_%s}"
FLAG = "are_triangles_more_secure_than_squares?_%s"
def get_salt(random):
salt = "".join([random.choice("0123456789abcdef") for i in range(8)])

View file

@ -36,7 +36,7 @@ def getspace(size):
def generate(string, debug=False):
size = 0
binstring = bin(int(string.encode("hex"), 16)).strip("0b")
while size < 2 or getspace(size + 1) < len(binstring):
while size < 3 or getspace(size + 1) - 8 < len(binstring):
size += 1
n = getspace(size)
# print size, len(binstring)

Binary file not shown.