Class PaddingOps
java.lang.Object
se.swedenconnect.opensaml.xmlsec.algorithm.PaddingOps
Static data operations for PSS padding.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]
concatenate
(byte[]... arrays) Concatenates the supplied arrays into one.static byte[]
i2osp
(BigInteger val, int len) Convert a BigInteger value to a byte array of a specified length.static BigInteger
os2ip
(byte[] val) Converts a byte array to a BigInteger.static byte[]
xor
(byte[] arg1, byte[] arg2) Performs bitwise XOR operation on two byte arrays.
-
Constructor Details
-
PaddingOps
public PaddingOps()
-
-
Method Details
-
i2osp
Convert a BigInteger value to a byte array of a specified length.- Parameters:
val
- the BigInteger value to be convertedlen
- the length of the resulting byte array- Returns:
- the byte array representation of the BigInteger value
- Throws:
IllegalArgumentException
- if the value requires more bytes than the assigned length size
-
os2ip
Converts a byte array to a BigInteger.- Parameters:
val
- the byte array to convert- Returns:
- the BigInteger representation of the byte array
-
xor
public static byte[] xor(byte[] arg1, byte[] arg2) Performs bitwise XOR operation on two byte arrays.- Parameters:
arg1
- the first byte arrayarg2
- the second byte array- Returns:
- the result of the XOR operation as a new byte array
- Throws:
NullPointerException
- if either arg1 or arg2 is nullIllegalArgumentException
- if arg1 and arg2 have different lengths
-
concatenate
public static byte[] concatenate(byte[]... arrays) Concatenates the supplied arrays into one.- Parameters:
arrays
- the arrays to concatenate- Returns:
- a concatenated array
-