我正在尝试在我的 Android 应用程序上使用 Spongy Castle。根据这些说明,我添加了 jar 文件,然后调用此方法以包含提供程序。
static {
Security.insertProviderAt(new org.spongycastle.jce.provider.BouncyCastleProvider(), 1);
}
但我仍然在这一行得到错误:
KeyStore keyStore = KeyStore.getInstance("SC");
我得到的例外是:
java.security.KeyStoreException: KeyStore SC implementation not found
我已经为此花费了几个小时,但我无法弄清楚我错过了什么。