aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2019-01-19 00:52:43 -0600
committerAlex Gaynor <alex.gaynor@gmail.com>2019-01-19 00:52:43 -0600
commit5fe88ea0500c6e418492f4b166c0d4a24e9632cc (patch)
tree4e63ba2759c0801646314a0b87056b66198217e2 /docs
parentfdc61a26ea32e2563dfcbe17484b6e662d7f1e0a (diff)
downloadcryptography-5fe88ea0500c6e418492f4b166c0d4a24e9632cc.tar.gz
cryptography-5fe88ea0500c6e418492f4b166c0d4a24e9632cc.tar.bz2
cryptography-5fe88ea0500c6e418492f4b166c0d4a24e9632cc.zip
shake128/256 support (#4611)
* shake128/256 support * remove block_size * doc an exception * change how we detect XOF by adding _xof attribute * interface! * review feedback
Diffstat (limited to 'docs')
-rw-r--r--docs/hazmat/primitives/cryptographic-hashes.rst30
-rw-r--r--docs/spelling_wordlist.txt1
2 files changed, 31 insertions, 0 deletions
diff --git a/docs/hazmat/primitives/cryptographic-hashes.rst b/docs/hazmat/primitives/cryptographic-hashes.rst
index bc979365..24cc70b5 100644
--- a/docs/hazmat/primitives/cryptographic-hashes.rst
+++ b/docs/hazmat/primitives/cryptographic-hashes.rst
@@ -185,6 +185,36 @@ than SHA-2 so at this time most users should choose SHA-2.
SHA3/512 is a cryptographic hash function from the SHA-3 family and is
standardized by NIST. It produces a 512-bit message digest.
+.. class:: SHAKE128(digest_size)
+
+ .. versionadded:: 2.5
+
+ SHAKE128 is an extendable output function (XOF) based on the same core
+ permutations as SHA3. It allows the caller to obtain an arbitrarily long
+ digest length. Longer lengths, however, do not increase security or
+ collision resistance and lengths shorter than 128 bit (16 bytes) will
+ decrease it.
+
+ :param int digest_size: The length of output desired. Must be greater than
+ zero.
+
+ :raises ValueError: If the ``digest_size`` is invalid.
+
+.. class:: SHAKE256(digest_size)
+
+ .. versionadded:: 2.5
+
+ SHAKE256 is an extendable output function (XOF) based on the same core
+ permutations as SHA3. It allows the caller to obtain an arbitrarily long
+ digest length. Longer lengths, however, do not increase security or
+ collision resistance and lengths shorter than 256 bit (32 bytes) will
+ decrease it.
+
+ :param int digest_size: The length of output desired. Must be greater than
+ zero.
+
+ :raises ValueError: If the ``digest_size`` is invalid.
+
SHA-1
~~~~~
diff --git a/docs/spelling_wordlist.txt b/docs/spelling_wordlist.txt
index 46144214..7e08f124 100644
--- a/docs/spelling_wordlist.txt
+++ b/docs/spelling_wordlist.txt
@@ -41,6 +41,7 @@ Docstrings
El
Encodings
endian
+extendable
fallback
Fernet
fernet