<commit_before>Secret Key Encryption
=====================

.. currentmodule:: nacl.secret

Secret key encryption (also called symmetric key encryption) is analogous to a
safe. You can store something secret through it and anyone who has the key can
open it and view the contents. :class:`~nacl.secret.SecretBox` functions as
just such a safe, and like any good safe any attempts to tamper with the
contents is easily detected.

Secret key encryption allows you to store or transmit data over insecure
channels without leaking the contents of that message, nor anything about it
other than the length.

Example
-------

.. testcode::

    import nacl.secret<commit_msg>docs: fix typo (#458)<commit_after>Secret Key Encryption
=====================

.. currentmodule:: nacl.secret

Secret key encryption (also called symmetric key encryption) is analogous to a
safe. You can store something secret through it and anyone who has the key can
open it and view the contents. :class:`~nacl.secret.SecretBox` functions as
just such a safe, and like any good safe any attempts to tamper with the
contents are easily detected.

Secret key encryption allows you to store or transmit data over insecure
channels without leaking the contents of that message, nor anything about it
other than the length.

Example
-------

.. testcode::

    import nacl.secret
{'fraction_non_alphanumeric': 0.08611729769858946, 'fraction_numerical': 0.0022271714922048997, 'mean_word_length': 4.349206349206349, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5954997', 'n_tokens_mistral': 333, 'n_tokens_neox': 316, 'n_words': 186}