def _pad_for_signing(message, target_length):
 max_msglength = (target_length - 11)
 msglength = len(message)
 if (msglength > max_msglength):
  raise OverflowError(('%i bytes needed for message, but there is only space for %i' % (msglength, max_msglength)))
 padding_length = ((target_length - msglength) - 3)
 return b('').join([b('\x00\x01'), (padding_length * b('\xff')), b('\x00'), message])

def _pad_for_signing ( message , target_length ) : max_msglength = ( target_length - 11 ) msglength = len ( message ) if ( msglength > max_msglength ) : raise OverflowError ( ( '%i bytes needed for message, but there is only space for %i' % ( msglength , max_msglength ) ) ) padding_length = ( ( target_length - msglength ) - 3 ) return b ( '' ) . join ( [ b ( '\x00\x01' ) , ( padding_length * b ( '\xff' ) ) , b ( '\x00' ) , message ] )
pads the message for signing .