It's bad idea in most cases to declare that method just ```throws Exception```
In fact it have to be little bit more detailed ```throws NoSuchAlgorithmException, IOException```
or even ```throws NoSuchAlgorithmException, FileNotFoundException, IOException```
This way code that calling this method will have possibility to handle each type of exception appropriately.