Keytool не подойдет?
File pub = new File(pathToFile); List<AuthorizedKeyEntry> entries = AuthorizedKeyEntry.readAuthorizedKeys(pub.toPath()); for (PublicKeyEntry entry : entries) { PublicKey publicKey = entry.resolvePublicKey(null, Collections.emptyMap(), PublicKeyEntryResolver.FAILING); }
Обсуждают сегодня