程序包 cn.authing.otp

类 Base32


  • public final class Base32
    extends Object
    Base32 encoding/decoding class.
    • 构造器详细资料

      • Base32

        public Base32()
    • 方法详细资料

      • decode

        public static byte[] decode​(String base32)
                             throws IllegalArgumentException
        Decode a Base32 string into an array of binary bytes. May fail if the parameter is a non canonical Base32 string (the only other possible exception is that the returned array cannot be allocated in memory)
        抛出:
        IllegalArgumentException
      • encode

        public static String encode​(byte[] bytes)
        Encode an array of binary bytes into a Base32 string. Should not fail (the only possible exception is that the returned string cannot be allocated in memory)