encrypt Method
Encrypts a buffer.
Syntax
def encrypt(buffer: bytes) -> bytes: ...
Remarks
Use this method to encrypt a byte array and get the protected message in another byte array.
Specify the encryption key in key property before calling this method.
This is a one-off encryption method. Don't use it with granular per-block methods(encrypt_init, encrypt_update, encrypt_final).