pkcs7.pyi 972 B

123456789101112131415161718192021222324252627282930
  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. import typing
  5. from cryptography import x509
  6. from cryptography.hazmat.primitives import serialization
  7. from cryptography.hazmat.primitives.serialization import pkcs7
  8. def serialize_certificates(
  9. certs: list[x509.Certificate],
  10. encoding: serialization.Encoding,
  11. ) -> bytes: ...
  12. def encrypt_and_serialize(
  13. builder: pkcs7.PKCS7EnvelopeBuilder,
  14. encoding: serialization.Encoding,
  15. options: typing.Iterable[pkcs7.PKCS7Options],
  16. ) -> bytes: ...
  17. def sign_and_serialize(
  18. builder: pkcs7.PKCS7SignatureBuilder,
  19. encoding: serialization.Encoding,
  20. options: typing.Iterable[pkcs7.PKCS7Options],
  21. ) -> bytes: ...
  22. def load_pem_pkcs7_certificates(
  23. data: bytes,
  24. ) -> list[x509.Certificate]: ...
  25. def load_der_pkcs7_certificates(
  26. data: bytes,
  27. ) -> list[x509.Certificate]: ...