We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b86bcd commit 764ee73Copy full SHA for 764ee73
core/src/main/java/org/bouncycastle/util/Arrays.java
@@ -1090,6 +1090,17 @@ public static byte[] reverseInPlace(byte[] a)
1090
return a;
1091
}
1092
1093
+ public static void reverseInPlace(byte[] a, int aOff, int aLen)
1094
+ {
1095
+ int p1 = aOff, p2 = aOff + aLen - 1;
1096
+ while (p1 < p2)
1097
1098
+ byte t1 = a[p1], t2 = a[p2];
1099
+ a[p1++] = t2;
1100
+ a[p2--] = t1;
1101
+ }
1102
1103
+
1104
public static int[] reverseInPlace(int[] a)
1105
{
1106
if (null == a)
0 commit comments