怎么加密怎么解密?
package zh.codegym.task.task18.task1826;
import java.io.*;
/*
加密
*/
public class Solution {
public static void main(String[] args) {
FileInputStream fr = null;
FileOutputStream wr = null;
try {
if (args[0].equals("-e"))
{
fr = new FileInputStream(args[1]);
wr = new FileOutputStream(args[2]);
byte[] buffer = new byte[fr.available()];
int count = fr.read(buffer);
wr.write(buffer, 0, count);
wr.flush();
}
else if (args[0].equals("-d")){
fr = new FileInputStream(args[1]);
wr = new FileOutputStream(args[2]);
byte[] buffer = new byte[fr.available()];
int count = fr.read(buffer);
wr.write(buffer, 0, count);
wr.flush();
}
else{
return;
}
fr.close();
wr.close();
}
catch (IOException e){
}
}
}