#NEWLINE# def encrypt( mode , key , iv , plaintext ) : #NEWLINE# #INDENT# cipher = base . Cipher ( algorithms . IDEA ( binascii . unhexlify ( key ) ) , mode ( binascii . unhexlify ( encryptor ) ) , backend ) #NEWLINE# encryptor = cipher . encryptor ( ) #NEWLINE# ct = encryptor . update ( binascii . unhexlify ( plaintext ) ) #NEWLINE# ct += encryptor . finalize ( ) #NEWLINE# return binascii . hexlify ( ct )