Package org.bouncycastle.util.encoders
Class HexTranslator
java.lang.Object
org.bouncycastle.util.encoders.HexTranslator
- All Implemented Interfaces:
Translator
Converters for going from hex to binary and back. Note: this class assumes ASCII processing.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
decode
(byte[] in, int inOff, int length, byte[] out, int outOff) int
encode
(byte[] in, int inOff, int length, byte[] out, int outOff) int
size of the output block on decoding produced by getEncodedBlockSize() bytes.int
size of the output block on encoding produced by getDecodedBlockSize() bytes.
-
Constructor Details
-
HexTranslator
public HexTranslator()
-
-
Method Details
-
getEncodedBlockSize
public int getEncodedBlockSize()size of the output block on encoding produced by getDecodedBlockSize() bytes.- Specified by:
getEncodedBlockSize
in interfaceTranslator
-
encode
public int encode(byte[] in, int inOff, int length, byte[] out, int outOff) - Specified by:
encode
in interfaceTranslator
-
getDecodedBlockSize
public int getDecodedBlockSize()size of the output block on decoding produced by getEncodedBlockSize() bytes.- Specified by:
getDecodedBlockSize
in interfaceTranslator
-
decode
public int decode(byte[] in, int inOff, int length, byte[] out, int outOff) - Specified by:
decode
in interfaceTranslator
-