Class Arrays
java.lang.Object
com.ongres.scram.common.bouncycastle.pbkdf2.Arrays
General array utilities.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]
copyOfRange
(byte[] data, int from, int to) Make a copy of a range of bytes from the passed in data array.private static int
getLength
(int from, int to)
-
Constructor Details
-
Arrays
private Arrays()
-
-
Method Details
-
copyOfRange
public static byte[] copyOfRange(byte[] data, int from, int to) Make a copy of a range of bytes from the passed in data array. The range can extend beyond the end of the input array, in which case the return array will be padded with zeroes.- Parameters:
data
- the array from which the data is to be copied.from
- the start index at which the copying should take place.to
- the final index of the range (exclusive).- Returns:
- a new byte array containing the range given.
-
getLength
private static int getLength(int from, int to)
-