From c0ce911b4e971f3090d406cb88dea532647eeac6 Mon Sep 17 00:00:00 2001 From: Ayrx Date: Wed, 7 May 2014 16:22:09 +0800 Subject: Renamed HKDFExpandOnly to HKDFExpand --- docs/hazmat/primitives/key-derivation-functions.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'docs/hazmat') diff --git a/docs/hazmat/primitives/key-derivation-functions.rst b/docs/hazmat/primitives/key-derivation-functions.rst index 9b76bf64..11fbd4e0 100644 --- a/docs/hazmat/primitives/key-derivation-functions.rst +++ b/docs/hazmat/primitives/key-derivation-functions.rst @@ -220,7 +220,7 @@ Different KDFs are suitable for different tasks such as: raises an exception if they do not match. -.. class:: HKDFExpandOnly(algorithm, length, info, backend) +.. class:: HKDFExpand(algorithm, length, info, backend) .. versionadded:: 0.5 @@ -230,7 +230,7 @@ Different KDFs are suitable for different tasks such as: .. warning:: - HKDFExpandOnly should only be used if the key material is + HKDFExpand should only be used if the key material is cryptographically strong. You should use :class:`~cryptography.hazmat.primitives.kdf.hkdf.HKDF` if you are unsure. @@ -239,19 +239,19 @@ Different KDFs are suitable for different tasks such as: >>> import os >>> from cryptography.hazmat.primitives import hashes - >>> from cryptography.hazmat.primitives.kdf.hkdf import HKDFExpandOnly + >>> from cryptography.hazmat.primitives.kdf.hkdf import HKDFExpand >>> from cryptography.hazmat.backends import default_backend >>> backend = default_backend() >>> info = b"hkdf-example" >>> key_material = os.urandom(16) - >>> hkdf = HKDFExpandOnly( + >>> hkdf = HKDFExpand( ... algorithm=hashes.SHA256(), ... length=32, ... info=info, ... backend=backend ... ) >>> key = hkdf.derive(key_material) - >>> hkdf = HKDFExpandOnly( + >>> hkdf = HKDFExpand( ... algorithm=hashes.SHA256(), ... length=32, ... info=info, -- cgit v1.2.3