When I try to run this code in my Main class my IDE pops up and says that I'm not handling the exception I'm throwing at the beginning of my method.
public byte[] generateSalt() throws NoSuchAlgorithmException{
// VERY important to use SecureRandom instead of just Random
SecureRandom random = SecureRandom.getInstance("SHA1PRNG");
// Generate a 8 byte (64 bit) salt as recommended by RSA PKCS5
byte[] salt = new byte[8];
random.nextBytes(salt);
return salt;
}