我想将字符串转换为键类型。
BufferedReader br = new BufferedReader(new FileReader(publicKeyFile));
String publicKey = br.readLine();//(Key) keyIn.readObject();
br.close();
Cipher cipher = Cipher.getInstance("RSA");
cipher.init(Cipher.WRAP_MODE, publicKey);
cipher.init(Cipher.WRAP_MODE, publicKey);
需要publickey
类型的接口Key
。
那么如何将字符串转换为键?