def pkcs1Pad(data, messageLength):
 lenPad = ((messageLength - 2) - len(data))
 return ((('\x01' + ('\xff' * lenPad)) + '\x00') + data)

def pkcs1Pad ( data , messageLength ) : lenPad = ( ( messageLength - 2 ) - len ( data ) ) return ( ( ( '\x01' + ( '\xff' * lenPad ) ) + '\x00' ) + data )
pad out data to messagelength according to the pkcs#1 standard .