mirror of
https://github.com/cedricbonhomme/Stegano.git
synced 2025-05-13 01:18:31 +02:00
Raise an exception if the message to hide is too long. closed #1
This commit is contained in:
parent
e2210bab54
commit
f629773772
1 changed files with 2 additions and 2 deletions
|
@ -47,7 +47,7 @@ def hide(input_image_file, message, generator_function):
|
||||||
|
|
||||||
npixels = width * height
|
npixels = width * height
|
||||||
if len(message_bits) > npixels * 3:
|
if len(message_bits) > npixels * 3:
|
||||||
return """Too long message (%s > %s).""" % (len(message_bits), npixels * 3)
|
raise Exception("""The message you want to hide is too long (%s > %s).""" % (len(message_bits), npixels * 3))
|
||||||
|
|
||||||
generator = getattr(generators, generator_function)()
|
generator = getattr(generators, generator_function)()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue