def pkcs_i2osp(x, xLen):
 fmt = ('%%0%dx' % (2 * xLen))
 return (fmt % x).decode('hex')

def pkcs_i2osp ( x , xLen ) : fmt = ( '%%0%dx' % ( 2 * xLen ) ) return ( fmt % x ) . decode ( 'hex' )
converts a long to the associated byte string representation of length l .