public String getPublicKey() { String publickey = null; try { Map<String, Object> keyMap = RSAUtils.genKeyPair(); publickey = RSAUtils.getPublicKey(keyMap); String privateKey = RSAUtils.getPrivateKey(keyMap); System.out.println("init userStatusCache - private key:" + privateKey); userStatusCache.setPrivateKey(privateKey); } catch (Exception e) { e.printStackTrace(); } return publickey; }