public class Base32String extends Object
The implementation is slightly different than in RFC 4648. During encoding, padding is not added, and during decoding the last incomplete chunk is not taken into account. The result is that multiple strings decode to the same byte array, for example, string of sixteen 7s ("7...7") and seventeen 7s both decode to the same byte array. TOD O(sarvar): Revisit this encoding and whether this ambiguity needs fixing. Source: http://code.google.com/p/google-authenticator License: ASL 2.0
| Modifier | Constructor and Description |
|---|---|
protected |
Base32String(String alphabet) |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
decode(String encoded) |
protected byte[] |
decodeInternal(String encoded) |
static String |
encode(byte[] data) |
protected String |
encodeInternal(byte[] data) |
static Base32String |
getInstance() |
protected Base32String(String alphabet)
public static Base32String getInstance()
public static byte[] decode(String encoded)
protected byte[] decodeInternal(String encoded)
public static String encode(byte[] data)
protected String encodeInternal(byte[] data)
Copyright © 2019. All Rights Reserved.