@param a array @param length new array size @return Value in a plus length appended 0 bytes
(final byte[] a, final int length)
| 1177 | * @return Value in <code>a</code> plus <code>length</code> appended 0 bytes |
| 1178 | */ |
| 1179 | public static byte[] padTail(final byte[] a, final int length) { |
| 1180 | byte[] padding = new byte[length]; |
| 1181 | for (int i = 0; i < length; i++) { |
| 1182 | padding[i] = 0; |
| 1183 | } |
| 1184 | return add(a, padding); |
| 1185 | } |
| 1186 | |
| 1187 | /** |
| 1188 | * Split passed range. Expensive operation relatively. Uses BigInteger math. |