RSA Encryption forceclosing before generating public/private keys

自古美人都是妖i 提交于 2019-12-06 01:47:57

I don't know what's causing your problem (we'd have to see where you use this class to debug that), but I do have an alternative for you, if you can include a 3rd party library. See JSch, which can generate RSA keypairs (e.g. for use in SSH public-key authentication). Documentation: http://epaul.github.com/jsch-documentation/simple.javadoc/

The method you're looking for is KeyPair.genKeyPair.

@The Obliviator When i see you AndroidManifest ,i found that you should have to remove below code from your manifest.

  <activity
        android:name=".RSA"
        android:label="@string/app_name" >
    </activity>

Because this class is not extends As Activity ,you required this class for GenerateKeyPair so no need to declare this class in Manifest file.And what about this class Installation ,is this class is also not extends as Activity then remove it also.After that you will get run successfully.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!