Курсовая работа: Анализ предметной области
byte[] br_enc = ecipher.doFinal(bytesReaded);
FileOutputStream outFile = new FileOutputStream(result);
outFile.write(br_enc);
outFile.close();
return true;
}
catch(Exception e)
{}
return false;
}
public boolean fileDecode(String sourse,String result)
{
try{
FileInputStream enc_inFile = new FileInputStream(sourse);
int enc_bytesAvailable = enc_inFile.available();
byte[] enc_bytesReaded = new byte[enc_bytesAvailable];
enc_inFile.read(enc_bytesReaded,0,enc_bytesAvailable);
enc_inFile.close();
byte[] br_dec =dcipher.doFinal(enc_bytesReaded);
FileOutputStream dec_outFile = new FileOutputStream(result);
dec_outFile.write(br_dec);
dec_outFile.close();
return true;
}
catch(Exception e)
{}
return false;
}
}