remove max_value
This commit is contained in:
@@ -131,7 +131,6 @@ class InnerKey(DarcKey):
|
|||||||
|
|
||||||
class AlphabetKey(DarcKey):
|
class AlphabetKey(DarcKey):
|
||||||
key_type: DarcKeyType = DarcKeyType.alphabet
|
key_type: DarcKeyType = DarcKeyType.alphabet
|
||||||
max_value: int = 255
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def init_matrix(cls, width: int, height: int, max_value: int):
|
def init_matrix(cls, width: int, height: int, max_value: int):
|
||||||
@@ -145,20 +144,18 @@ class AlphabetKey(DarcKey):
|
|||||||
|
|
||||||
class Mask(DarcKey):
|
class Mask(DarcKey):
|
||||||
key_type: DarcKeyType = DarcKeyType.alphabet
|
key_type: DarcKeyType = DarcKeyType.alphabet
|
||||||
max_value: int = 255
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def init_matrix(cls, width: int, height: int, col_mask: int):
|
def init_matrix(cls, width: int, height: int, col_mask: int):
|
||||||
""" originally buildScramble """
|
""" originally buildScramble """
|
||||||
|
max_value = 255
|
||||||
mask = cls._random_mask(width, cls.max_value)
|
mask = cls._random_mask(width, max_value)
|
||||||
matrix = [[0 for _ in range(width)] for _ in range(height)]
|
matrix = [[0 for _ in range(width)] for _ in range(height)]
|
||||||
if col_mask < height:
|
if col_mask < height:
|
||||||
matrix[col_mask] = mask
|
matrix[col_mask] = mask
|
||||||
|
|
||||||
return Mask(
|
return Mask(
|
||||||
matrix=matrix,
|
matrix=matrix,
|
||||||
max_value=cls.max_value
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user