Android Keystore(包括KeyPairGeneratorSpec
等)在API级别18中引入。然而,KeyPairGeneratorSpec.Builder.setKeySize()
方法仅在API级别19中引入。
虽然支持API级别18(Android 4.3),但是否有可能设置密钥大小?
Android Keystore(包括KeyPairGeneratorSpec
等)在API级别18中引入。然而,KeyPairGeneratorSpec.Builder.setKeySize()
方法仅在API级别19中引入。
虽然支持API级别18(Android 4.3),但是否有可能设置密钥大小?
Key
大小。但是根据另一种来源 (参考API级别18):
虽然我认为你应该能够使用不同的当前无法指定密钥大小或类型,生成的密钥默认为2048位RSA。
AlgorithmParameterSpec
,例如自API级别1起可用的旧的RSAKeyGenParameterSpec
,它将密钥大小作为构造函数参数:keyPairGenerator.initialize(new RSAKeyGenParameterSpec(keySize, publicExponent));