#NEWLINE# def get_db_prep_value( self , value , connection , prepared = False ) : #NEWLINE# #INDENT# if ( not value . startswith ( self . __prefix ) ) : #NEWLINE# #INDENT# value = value . encode ( 'utf-8' ) #NEWLINE# if ( ( len ( value ) % 8 ) != 0 ) : #NEWLINE# #INDENT# counter = ( 8 - ( len ( value ) % 8 ) ) #NEWLINE# value = ( value + ( '\x00' * counter ) ) #NEWLINE# #UNINDENT# return ( self . __prefix + base64 . b64encode ( self . cipher . encrypt ( value ) ) ) #NEWLINE# #UNINDENT# return value