diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2019-01-19 00:52:43 -0600 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2019-01-19 00:52:43 -0600 |
commit | 5fe88ea0500c6e418492f4b166c0d4a24e9632cc (patch) | |
tree | 4e63ba2759c0801646314a0b87056b66198217e2 /docs/hazmat/primitives | |
parent | fdc61a26ea32e2563dfcbe17484b6e662d7f1e0a (diff) | |
download | cryptography-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/hazmat/primitives')
-rw-r--r-- | docs/hazmat/primitives/cryptographic-hashes.rst | 30 |
1 files changed, 30 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 ~~~~~ |