diff --git a/docs/conf.py b/docs/conf.py index 97f8656..fd4e497 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ copyright = u'2012-2016, Cédric Bonhomme' # built documents. # # The short X.Y version. -version = '0.7' +version = '0.5.1' # The full version, including alpha/beta/rc tags. -release = '0.7' +release = '0.5.1' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/index.rst b/docs/index.rst index dbe975b..65a6bc5 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -9,35 +9,20 @@ Welcome to Stéganô's documentation! Presentation ============ -.. figure:: https://api.travis-ci.org/cedricbonhomme/Stegano.svg?branch=master - :align: left - :target: https://travis-ci.org/cedricbonhomme/Stegano - - Stéganô_ is a Python steganography_ module. -Steganography is the art and science of writing hidden messages in such a way that no one, -apart from the sender and intended recipient, suspects the existence of the message, a form -of security through obscurity. Consequently, functions provided by Stéganô only hide message, -without encryption. Indeed steganography is often used with cryptography. +Steganography is the art and science of writing hidden messages in such a way +that no one, apart from the sender and intended recipient, suspects the +existence of the message, a form of security through obscurity. +Consequently, functions provided by Stéganô only hide messages, +without encryption. Steganography is often used with cryptography. - -Requirements -============ - -- Python_ >= 3.2 (tested with Python 3.3.1); -- `Pillow`_. - - -Methods of hiding -================= - -For the moment, Stéganô implements these methods of hiding: +Stéganô implements these methods of hiding: - using the red portion of a pixel to hide ASCII messages; - using the `Least Significant Bit `_ (LSB) technique; - using the LSB technique with sets based on generators (Sieve for Eratosthenes, Fermat, Mersenne numbers, etc.); -- using the description field of the image (JPEG). +- using the description field of the image (JPEG and TIFF). Moreover some methods of steganalysis_ are provided: @@ -45,10 +30,24 @@ Moreover some methods of steganalysis_ are provided: - statistical steganalysis. +Requirements +============ + +- Python_ >= 3.2 (tested with Python 3.5.1); +- `Pillow`_; +- `piexif`_. + + Turorial ======== -More information available at the :doc:`tutorial ` page +.. toctree:: + :maxdepth: 2 + + tutorial + +You can also take a look at the +`unit tests `_. License @@ -70,8 +69,9 @@ Contact `My home page `_ -.. _Python: http://python.org +.. _Python: https://www.python.org .. _Stéganô: https://github.com/cedricbonhomme/Stegano .. _`Pillow`: https://pypi.python.org/pypi/Pillow +.. _`piexif`: https://pypi.python.org/pypi/piexif .. _steganography: http://en.wikipedia.org/wiki/Steganography .. _steganalysis: http://en.wikipedia.org/wiki/Steganalysis diff --git a/docs/tutorial.rst b/docs/tutorial.rst index de9e176..406d8a8 100644 --- a/docs/tutorial.rst +++ b/docs/tutorial.rst @@ -1,10 +1,3 @@ -Getting the source code of Stéganô -================================== - -.. code-block:: bash - - $ git clone https://github.com/cedricbonhomme/Stegano.git - Installation ============ @@ -12,22 +5,53 @@ Installation $ sudo pip install Stegano -Now you will be able to use Stéganô in your Python program. +You will be able to use Stéganô in your Python programs +or as a command line tool. + +If you want to retrieve the source code (with the unit tests): + +.. code-block:: bash + + $ git clone https://github.com/cedricbonhomme/Stegano.git + +.. image:: https://api.travis-ci.org/cedricbonhomme/Stegano.svg?branch=master + :target: https://travis-ci.org/cedricbonhomme/Stegano Using Stéganô as a Python module ================================ +LSB method +---------- + .. code-block:: python - Python 2.7 (r27:82500, Jul 5 2010, 10:14:47) - [GCC 4.3.2] on linux2 + Python 3.5.1 (default, Dec 7 2015, 11:33:57) + [GCC 4.9.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from stegano import slsb - >>> secret = slsb.hide("./pictures/Lenna.png", "Hello world!") + >>> secret = slsb.hide("./examples/pictures/Lenna.png", "Hello world!") >>> secret.save("./Lenna-secret.png") - >>> slsb.reveal("./Lenna-secret.png") + >>> print(slsb.reveal("./Lenna-secret.png")) Hello world! +Description field of the image +------------------------------ + +For JPEG and TIFF images. + +.. code-block:: python + + Python 3.5.1 (default, Dec 7 2015, 11:33:57) + [GCC 4.9.2] on linux + Type "help", "copyright", "credits" or "license" for more information. + >>> from stegano import exifHeader + >>> secret = exifHeader.hide("./examples/pictures/20160505T130442.jpg", + "./image.jpg", secret_message="Hello world!") + >>> print(exifHeader.reveal("./image.jpg")) + +More examples are available in the +`tests `_. + Using Stéganô in command line for your scripts ==============================================