what-the-bank/sources/o/oHp.java

34 lines
1.1 KiB
Java

package o;
import com.google.common.base.Ascii;
import com.google.common.primitives.UnsignedBytes;
import com.google.crypto.tink.internal.TinkBugException;
import java.security.SecureRandom;
/* loaded from: classes2.dex */
public final class oHp {
public static int c() {
SecureRandom secureRandom = new SecureRandom();
byte[] bArr = new byte[4];
int i = 0;
while (i == 0) {
secureRandom.nextBytes(bArr);
i = ((bArr[0] & Ascii.DEL) << 24) | ((bArr[1] & UnsignedBytes.MAX_VALUE) << 16) | ((bArr[2] & UnsignedBytes.MAX_VALUE) << 8) | (bArr[3] & UnsignedBytes.MAX_VALUE);
}
return i;
}
public static final C1246Yua e(String str) {
int length = str.length();
byte[] bArr = new byte[length];
for (int i = 0; i < str.length(); i++) {
char charAt = str.charAt(i);
if (charAt < '!' || charAt > '~') {
throw new TinkBugException("Not a printable ASCII character: ".concat(String.valueOf(charAt)));
}
bArr[i] = (byte) charAt;
}
return new C1246Yua(bArr, length);
}
}