#NEWLINE# def finalize( self ) : #NEWLINE# #INDENT# if ( self . _bytes_processed % self . _byte_block_size ) : #NEWLINE# #INDENT# raise ValueError ( 'The length of the provided data is not a multiple of the block length.' ) #NEWLINE# #UNINDENT# buf = self . _backend . _ffi . new ( 'unsigned char[]' , self . _byte_block_size ) #NEWLINE# outlen = self . _backend . _ffi . new ( 'size_t *' ) #NEWLINE# res = self . _backend . _lib . CCCryptorFinal ( self . _ctx [ 0 ] , buf , len ( buf ) , outlen ) #NEWLINE# self . _backend . _check_cipher_response ( res ) #NEWLINE# self . _backend . _release_cipher_ctx ( self . _ctx ) #NEWLINE# return self . _backend . _ffi . buffer ( buf ) [ : outlen [ 0 ] ]