public static String getHash(File f, AlgorithmToUse algorithmToUse) {
      // Figure out which algorithm to use
      switch (algorithmToUse) {
         case MD5:
            return generateHash(f, "MD5");
         case SHA1:
            return generateHash(f, "SHA");
         default:
            return "No such algorithm";
      }
   }