Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有谁知道我如何创建一个生成随机 64 位数字(0 到 2^63 - 1)并转换为字符串的方法?
谢谢
在 C# 中,您可能会尝试这样的事情:
byte[] bytes = new byte[64]; Random rnd = new Random(); rnd.NextBytes(bytes); var str64 = Convert.ToBase64String(bytes);