add api: xrand/xtapi
Merge pull request #21 from gaolele5911/xtapiAndxrand2

merge xtapi and xrand2.