Convert byte array into any base

前端 未结 9 2449
梦如初夏
梦如初夏 2021-02-13 17:58

I have an array of bytes (any length), and I want to encode this array into string using my own base encoder. In .NET is standard Base64 encoder, but w

9条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-13 18:10

    A post on CodeReview prompted me to create a RadixEncoding class which is able to handle encoding/decoding a byte array to/from a base-N string.

    The class can be found in this Q&A thread, along with documentation on (and solutions for) a few edge cases when dealing with BigInteger, endian-ness support, and the class' overall performance

提交回复
热议问题