code: def new_cipher(self, key, mode_iv, digest=None):
          
          if self.is_aead and digest is not None:
              # With AEAD, the mode needs the digest during decryption.
              return Cipher(
                  self.cipher(key),
                  self.mode(mode_iv, digest, len(digest)),
                  default_backend(),
              )
          else:
              return Cipher(
                  self.cipher(key),
                  self.mode(mode_iv),
                  default_backend(),
              )
docs: @param key:     the secret key, a byte string
          @param mode_iv: the initialization vector or nonce, a byte string.
                          Formatted by `format_mode_iv`.
          @param digest:  also known as tag or icv. A byte string containing the
                          digest of the encrypted data. Only use this during
                          decryption!
  
          @return:    an initialized cipher object for this algo