(x,xLen)
return '\x00'*padlen + z
Converts a long (the first parameter) to the associated byte string
    representation of length l (second parameter). Basically, the length
    parameters allow the function to perform the associated padding.

    Input : x        nonnegative integer to be converted
            xLen     intended length of the resulting octet string

    Output: x        corresponding nonnegative integer

    Reverse function is pkcs_os2ip().
Converts a long (the first parameter) to the associated byte string
    representation of length l (second parameter). Basically, the length
    parameters allow the function to perform the associated padding.
Converts a long ( the first parameter ) to the associated byte string representation of length l ( second parameter ) . Basically the length parameters allow the function to perform the associated padding .
def pkcs_i2osp(x,xLen):
    """
    Converts a long (the first parameter) to the associated byte string
    representation of length l (second parameter). Basically, the length
    parameters allow the function to perform the associated padding.

    Input : x        nonnegative integer to be converted
            xLen     intended length of the resulting octet string

    Output: x        corresponding nonnegative integer

    Reverse function is pkcs_os2ip().
    """
    z = RSA.number.long_to_bytes(x)
    padlen = max(0, xLen-len(z))
    return '\x00'*padlen + z
def pkcs_i2osp ( x , xLen ) : z = RSA . number . long_to_bytes ( x ) padlen = max ( 0 , xLen - len ( z ) ) return '\x00' * padlen + z