}
} else if(args[0].equals("--gen-key") && args.length==3) {
CryptoLib cl = new CryptoLib();
KeyPair kp = cl.genKeyPair();
FileWriter privFile = new FileWriter(args[1]);
privFile.write(Base64Order.standardCoder.encode(
cl.getBytesOfPrivateKey(kp.getPrivate())));
privFile.close();
FileWriter pubFile = new FileWriter(args[2]);
pubFile.write(Base64Order.standardCoder.encode(
cl.getBytesOfPublicKey(kp.getPublic())));
pubFile.close();
}
} catch (FileNotFoundException e) {
System.out.println("File not found: " + e.getMessage());