Package org.bouncycastle.crypto.util
Class RadixConverter
java.lang.Object
org.bouncycastle.crypto.util.RadixConverter
Utility class to convert decimal numbers (BigInteger) into a number in the base provided and the other way round.
For an application of this see the FPE parameter classes.
-
Constructor Summary
ConstructorDescriptionRadixConverter
(int radix) RadixConverter
(int radix, int numberOfCachedPowers) -
Method Summary
Modifier and TypeMethodDescriptionfromEncoding
(short[] digits) int
int
getRadix()
void
toEncoding
(BigInteger number, int messageLength, short[] out)
-
Constructor Details
-
RadixConverter
public RadixConverter(int radix, int numberOfCachedPowers) - Parameters:
radix
- the radix to use for base conversionsnumberOfCachedPowers
- number of intermediate base powers to precompute and cache.
-
RadixConverter
public RadixConverter(int radix) - Parameters:
radix
- the radix to use for base conversions.
-
-
Method Details
-
getRadix
public int getRadix() -
toEncoding
-
fromEncoding
-
getDigitsGroupLength
public int getDigitsGroupLength()
-