Utils: Don't allow passing null into bigIntegerToBytes().

This commit is contained in:
Andreas Schildbach
2017-05-16 19:35:54 +02:00
parent 35b1028656
commit 9bde092143

View File

@@ -67,9 +67,6 @@ public class Utils {
* @return numBytes byte long array.
*/
public static byte[] bigIntegerToBytes(BigInteger b, int numBytes) {
if (b == null) {
return null;
}
byte[] bytes = new byte[numBytes];
byte[] biBytes = b.toByteArray();
int start = (biBytes.length == numBytes + 1) ? 1 : 0;