package o; import java.util.Iterator; import java.util.NoSuchElementException; /* loaded from: classes6.dex */ public final class grK { public static boolean b(byte[] bArr, byte[] bArr2) { if (bArr == bArr2) { return true; } if (bArr == null || bArr2 == null || bArr.length != bArr2.length) { return false; } for (int i = 0; i != bArr.length; i++) { if (bArr[i] != bArr2[i]) { return false; } } return true; } public static int c(byte[] bArr) { if (bArr == null) { return 0; } int length = bArr.length; int i = length + 1; while (true) { length--; if (length < 0) { return i; } i = (i * 257) ^ bArr[length]; } } /* loaded from: classes6.dex */ public static class RVV implements Iterator { private final T[] a; private int b = 0; public RVV(T[] tArr) { this.a = tArr; } @Override // java.util.Iterator public final boolean hasNext() { return this.b < this.a.length; } @Override // java.util.Iterator public final T next() { int i = this.b; T[] tArr = this.a; if (i == tArr.length) { StringBuilder sb = new StringBuilder("Out of elements: "); sb.append(this.b); throw new NoSuchElementException(sb.toString()); } this.b = i + 1; return tArr[i]; } @Override // java.util.Iterator public final void remove() { throw new UnsupportedOperationException("Cannot remove element from an Array."); } } }