wownero
/
wownerujo
Archived
4
0
Fork 0

remove variant code for arm32 (#290)

upstream
m2049r 6 years ago committed by GitHub
parent 0cf5981eae
commit cd986860c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -26,7 +26,6 @@ import android.security.keystore.KeyGenParameterSpec;
import android.security.keystore.KeyProperties;
import android.support.annotation.NonNull;
import android.util.Base64;
import android.util.Log;
import java.io.IOException;
import java.math.BigInteger;
@ -92,8 +91,27 @@ public class KeyStoreHelper {
// due to a link bug in the initial implementation, some crazypasses were built with
// prehash & variant == 1
// since there are wallets out there, we need to keep this here
// arm32 variant code is broken in monero-core
// (raises "signal 7 (SIGBUS), code 1 (BUS_ADRALN)" in cn_slow_hash())
if (isArm32()) return "";
return getCrazyPass(context, password, true);
}
private static Boolean isArm32 = null;
public static boolean isArm32() {
if (isArm32 != null) return isArm32;
synchronized (KeyStoreException.class) {
if (isArm32 != null) return isArm32;
if (Build.SUPPORTED_ABIS[0].equals("armeabi-v7a")) {
isArm32 = true;
} else {
isArm32 = false;
}
return isArm32;
}
}
public static boolean saveWalletUserPass(@NonNull Context context, String wallet, String password) {