为什么 isInsideSecureHardware 在 Android 模拟器上返回 true?

Jos*_*eia 5 java android hsm android-keystore

下面是我在 Android API 27 上运行的代码:

KeyPairGenerator keyGen = null;
keyGen = KeyPairGenerator.getInstance(KeyProperties.KEY_ALGORITHM_RSA, "AndroidKeyStore"); // store the key in the Android KeyStore for security purposes
keyGen.initialize(new KeyGenParameterSpec.Builder(
        "key1",
        KeyProperties.PURPOSE_SIGN)
        .build()); // defaults to RSA 2048
KeyPair keyPair = keyGen.generateKeyPair();

KeyFactory factory = KeyFactory.getInstance(keyPair.getPrivate().getAlgorithm(), "AndroidKeyStore");
KeyInfo keyInfo = factory.getKeySpec(keyPair.getPrivate(), KeyInfo.class);
boolean secure = keyInfo.isInsideSecureHardware();
System.out.println("Is the private key backed in hardware: " + secure);
Run Code Online (Sandbox Code Playgroud)

由于我在模拟器上运行此代码,我希望它返回false,但不知何故它正在返回true。当模拟器完全由软件提供支持时,它如何获得硬件支持?Android Studio 是否以某种方式使用我的 Mac 上的 T2 芯片作为其硬件支持?