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.
如何从 4 个 UInt64 整数创建 base64 编码字符串?我认为有几个步骤我不确定如何处理,例如组合整数,转换为二进制,或者可能使用整数上的一些循环构造字符串?我将不胜感激任何代码示例或有关如何实现此目的的指针。
It this what you want?
func base64String(integers: [UInt64]) throws -> String { let data = try JSONEncoder().encode(integers) let string = data.base64EncodedString() return string } // call let result = try? base64String(integers: [234, 23, 3, 1002, 3])