hkdf.py 543 B

12345678910111213141516
  1. # This file is dual licensed under the terms of the Apache License, Version
  2. # 2.0, and the BSD License. See the LICENSE file in the root of this repository
  3. # for complete details.
  4. from __future__ import annotations
  5. from cryptography.hazmat.bindings._rust import openssl as rust_openssl
  6. from cryptography.hazmat.primitives.kdf import KeyDerivationFunction
  7. HKDF = rust_openssl.kdf.HKDF
  8. HKDFExpand = rust_openssl.kdf.HKDFExpand
  9. KeyDerivationFunction.register(HKDF)
  10. KeyDerivationFunction.register(HKDFExpand)
  11. __all__ = ["HKDF", "HKDFExpand"]