encrypt Method
Encrypts data.
Syntax
def encrypt() -> None: ...
Remarks
This method encrypts the data provided via input_file or input_stream in accordance with PKCS#7 standard.
If encrypted with an encryption_certificate a message of EnvelopedData subtype is created. The private key that corresponds to the certificate is needed to decrypt the data.
If encrypted with key, a message of EncryptedData subtype is formed. The receiving party needs the same key as provided in key to decrypt the message.