Курсовая работа: Анализ предметной области
dcipher = Cipher.getInstance("DES");
ecipher.init(Cipher.ENCRYPT_MODE, key);
dcipher.init(Cipher.DECRYPT_MODE, key);
return key;
}
catch(Exception e)
{
}
return null;
}
public void iniCoding(SecretKey key)
{
try{
ecipher = Cipher.getInstance("DES");
dcipher = Cipher.getInstance("DES");
ecipher.init(Cipher.ENCRYPT_MODE, key);
dcipher.init(Cipher.DECRYPT_MODE, key);
}
catch(Exception e)
{
}
}
public boolean fileEncode(String sourse,String result)
{
try{
FileInputStream inFile = new FileInputStream(sourse);
int bytesAvailable = inFile.available();
byte[] bytesReaded = new byte[bytesAvailable];
inFile.read(bytesReaded,0,bytesAvailable);