mirror of
https://github.com/cedricbonhomme/Stegano.git
synced 2025-05-12 17:18:30 +02:00
Add test with ackermann_naive generator
This commit is contained in:
parent
f6aa2207f4
commit
54938159d4
1 changed files with 14 additions and 0 deletions
|
@ -76,6 +76,20 @@ class TestLSB(unittest.TestCase):
|
||||||
|
|
||||||
self.assertEqual(message, clear_message)
|
self.assertEqual(message, clear_message)
|
||||||
|
|
||||||
|
def test_hide_and_reveal_with_ackermann_naive(self):
|
||||||
|
messages_to_hide = ["foo"]
|
||||||
|
for message in messages_to_hide:
|
||||||
|
secret = lsb.hide(
|
||||||
|
"./tests/sample-files/Lenna.png",
|
||||||
|
message,
|
||||||
|
generators.ackermann_naive(m=2),
|
||||||
|
)
|
||||||
|
secret.save("./image.png")
|
||||||
|
|
||||||
|
clear_message = lsb.reveal("./image.png", generators.ackermann_naive(m=2))
|
||||||
|
|
||||||
|
self.assertEqual(message, clear_message)
|
||||||
|
|
||||||
def test_hide_and_reveal_with_shi_tomashi(self):
|
def test_hide_and_reveal_with_shi_tomashi(self):
|
||||||
messages_to_hide = ["foo bar"]
|
messages_to_hide = ["foo bar"]
|
||||||
for message in messages_to_hide:
|
for message in messages_to_hide:
|
||||||
|
|
Loading…
Add table
Reference in a new issue