关于随机数方面,就没必要自己造轮子,本文采用https://github.com/dsprenkels/randombytes (opens new window)的源代码,感谢作者的无私贡献。