Package org.forgerock.json.jose.utils
Class BigIntegerUtils
java.lang.Object
org.forgerock.json.jose.utils.BigIntegerUtils
Utils to complement bit operations not covered by the BigInteger functions.
- 
Method Summary
Modifier and TypeMethodDescriptionstatic BigIntegerbase64UrlDecode(String magnitudeBase64UrlEncoded) Decode a big-endian base64 url encoding of a magnitude big integer and transform it as a positive big integer.static StringEncode a big integer into a base 64 url encoded unsigned big endian.static byte[]Returns the unsigned big-endian byte array of a big integer. 
- 
Method Details
- 
toBytesUnsigned
Returns the unsigned big-endian byte array of a big integer. Any leading zero sign byte is removed.- Parameters:
 x- a big integer- Returns:
 - the unsigned big-endian byte array of x
 
 - 
base64UrlDecode
Decode a big-endian base64 url encoding of a magnitude big integer and transform it as a positive big integer.- Parameters:
 magnitudeBase64UrlEncoded- big-endian base64 url encoding of a big integer magnitude- Returns:
 - a positive big integer with the decoded magnitude.
 
 - 
base64UrlEncodeUnsignedBigEndian
Encode a big integer into a base 64 url encoded unsigned big endian.- Parameters:
 number- a big integer- Returns:
 - big-endian base64 url encoding of a big integer magnitude
 
 
 -