#NEWLINE# def encryptor( self ) : #NEWLINE# #INDENT# if isinstance ( self . mode , modes . ModeWithAuthenticationTag ) : #NEWLINE# #INDENT# if ( self . mode . tag is not None ) : #NEWLINE# #INDENT# raise ValueError ( 'Authentication tag must be None when encrypting.' ) #NEWLINE# #UNINDENT# #UNINDENT# ctx = self . _backend . create_symmetric_encryption_ctx ( self . algorithm , self . mode ) #NEWLINE# return self . _wrap_ctx ( ctx , encrypt = True )