Package org.cryptacular.codec
Class Base32Codec
java.lang.Object
org.cryptacular.codec.Base32Codec
- All Implemented Interfaces:
Codec
Base 32 encoder/decoder pair.
- Author:
- Middleware Services
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance using the RFC 4328 alphabet,ABCDEFGHIJKLMNOPQRSTUVWXYZ234567
.Base32Codec
(String alphabet) Creates a new instance using the given 32-character alphabet.Base32Codec
(String alphabet, boolean inputOutputPadding) Creates a new instance using the given 32-character alphabet with option to enable/disable padding. -
Method Summary
Modifier and TypeMethodDescription
-
Constructor Details
-
Base32Codec
public Base32Codec()Creates a new instance using the RFC 4328 alphabet,ABCDEFGHIJKLMNOPQRSTUVWXYZ234567
. -
Base32Codec
Creates a new instance using the given 32-character alphabet.- Parameters:
alphabet
- 32-character alphabet to use.
-
Base32Codec
Creates a new instance using the given 32-character alphabet with option to enable/disable padding.- Parameters:
alphabet
- 32-character alphabet to use.inputOutputPadding
- True to enable support for padding, false otherwise.
-
-
Method Details
-
getEncoder
- Specified by:
getEncoder
in interfaceCodec
- Returns:
- The byte-to-char encoder of the codec pair.
-
getDecoder
- Specified by:
getDecoder
in interfaceCodec
- Returns:
- The char-to-byte decoder of the codec pair.
-
newEncoder
- Specified by:
newEncoder
in interfaceCodec
- Returns:
- A new instance of the byte-to-char encoder of the codec pair.
-
newDecoder
- Specified by:
newDecoder
in interfaceCodec
- Returns:
- A new instance of the char-to-byte decoder of the codec pair.
-