Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
hudeany authored Jan 8, 2023
1 parent 4375df8 commit 41b3bd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Example code for putty key (ppk) generation and conversion to PKCS#8 (pem)
java.security.KeyPairGenerator keyPairGenerator = java.security.KeyPairGenerator.getInstance("RSA");
keyPairGenerator.initialize(4096);
java.security.KeyPair keyPair = keyPairGenerator.generateKeyPair();
SshKey sshKey = new SshKey(SshKeyFormat.Putty2, "TestKey (ÄÖÜäöüß)", keyPair);
SshKey sshKey = new SshKey(SshKeyFormat.Putty2, "TestKey", keyPair);
SshKeyWriter.writePuttyVersion2Key(new FileOutputStream("test.ppk"), sshKey, "password".toCharArray());
SshKey readSshKey = SshKeyReader.readKey(new FileInputStream("test.ppk"), "password".toCharArray());
SshKeyWriter.writePKCS8Format(new FileOutputStream("test.pem"), readSshKey, "password".toCharArray());

0 comments on commit 41b3bd6

Please sign in to comment.