code: def encrypt(self, data):
          
          if False in six.itervalues(self.ready):
              raise CipherError(data)
          encryptor = self._cipher.encryptor()
          tmp = encryptor.update(data) + encryptor.finalize()
          self.iv = tmp[-self.block_size:]
          return tmp
docs: Encrypt the data. Also, update the cipher iv. This is needed for SSLv3
          and TLS 1.0. For TLS 1.1/1.2, it is overwritten in TLS.post_build().