Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- File file = new File(nomeFich + File.separator + "public.key");
- File file2 = new File(nomeFich + File.separator + "private.key");
- KeyPair keyPair = KeyPair.createKeyPair();
- DataOutputStream dos = new DataOutputStream(new FileOutputStream(file));
- dos = new DataOutputStream(new FileOutputStream(file));
- dos.write(keyPair.getPublic().exportKey());
- dos.close();
- dos = new DataOutputStream(new FileOutputStream(file2));
- dos.write(keyPair.getPrivate().exportKey());
- dos.close();
Add Comment
Please, Sign In to add comment