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