code: public static Map<String, Object> genKeyPair() throws Exception {
          KeyPairGenerator keyPairGen = KeyPairGenerator.getInstance(KEY_ALGORITHM);
          keyPairGen.initialize(1024);
          KeyPair keyPair = keyPairGen.generateKeyPair();
          RSAPublicKey publicKey = (RSAPublicKey) keyPair.getPublic();
          RSAPrivateKey privateKey = (RSAPrivateKey) keyPair.getPrivate();
          Map<String, Object> keyMap = new HashMap<String, Object>(2);
          keyMap.put(PUBLIC_KEY, publicKey);
          keyMap.put(PRIVATE_KEY, privateKey);
          return keyMap;
      }
docs: <p>
  生成密钥对(公钥和私钥)
  </p>
  
  @return
  @throws Exception