Package org.cryptacular.codec
Class Base32Decoder
java.lang.Object
org.cryptacular.codec.AbstractBaseNDecoder
org.cryptacular.codec.Base32Decoder
- All Implemented Interfaces:
Decoder
Stateful base 32 decoder with support for line breaks.
- Author:
- Middleware Services
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance using the RFC 4648 alphabet,ABCDEFGHIJKLMNOPQRSTUVWXYZ234567, for decoding.Base32Decoder(boolean paddedInput) Creates a new instance using the given 32-character alphabet for decoding.Base32Decoder(String alphabet) Creates a new instance using the given 32-character alphabet for decoding.Base32Decoder(String alphabet, boolean paddedInput) Creates a new instance using the given 32-character alphabet for decoding. -
Method Summary
Methods inherited from class org.cryptacular.codec.AbstractBaseNDecoder
decode, decodingTable, finalize, isPaddedInput, outputSize
-
Constructor Details
-
Base32Decoder
public Base32Decoder()Creates a new instance using the RFC 4648 alphabet,ABCDEFGHIJKLMNOPQRSTUVWXYZ234567, for decoding. -
Base32Decoder
Creates a new instance using the given 32-character alphabet for decoding.- Parameters:
alphabet- 32-character alphabet to use.
-
Base32Decoder
public Base32Decoder(boolean paddedInput) Creates a new instance using the given 32-character alphabet for decoding.- Parameters:
paddedInput- True to enable support for padded input, false otherwise.
-
Base32Decoder
Creates a new instance using the given 32-character alphabet for decoding.- Parameters:
alphabet- 32-character alphabet to use.paddedInput- True to enable support for padded input, false otherwise.
-
-
Method Details
-
getBlockLength
protected int getBlockLength()- Specified by:
getBlockLengthin classAbstractBaseNDecoder- Returns:
- Number of bits in a block of encoded characters.
-
getBitsPerChar
protected int getBitsPerChar()- Specified by:
getBitsPerCharin classAbstractBaseNDecoder- Returns:
- Number of bits encoding a single character.
-