RSA加解密
公私钥生成 import sun.misc.BASE64Decoder; import sun.misc.BASE64Encoder; import java.security.Key; import java.security.KeyPair; import java.security.KeyPairGenerator; import java.security.interfaces.RSAPrivateKey; import java.security.interfaces.RSAPublicKey; import java.util.HashMap; import java.util.Map; public class CreateSecrteKey { public class Keys { } public static final String KEY_ALGORITHM = "RSA"; //public static final String SIGNATURE_ALGORITHM = "MD5withRSA"; private static final String PUBLIC_KEY = "knpubPublicKey"; private static final String PRIVATE_KEY = "knpubPrivateKey"; //获得公钥