我想将像“Hello World”这样的消息转换为 base58,然后能够使用 node.js 对其进行解码。Base-58 模块有以下解释,但我无法完全理解如何转换我的消息。
Base58.encode(a Buffer or Uint8Array) returns a String
Base58.decode(a String) returns a Buffer
Run Code Online (Sandbox Code Playgroud)
我想我需要先将消息转换为其他内容,然后再转换为 Base58。要解码 Base58 消息,再次需要转换为其他内容,然后从那里转换为文本,对吧?