Code example for GeneralSecurityException

0
                storeValidator(validator);
            } 
            else { 
                rawKey = loadKeyData();
                if (!checkKeyValid(rawKey, loadValidator())) {
                    throw new GeneralSecurityException("Stored key is incorrect or corrupt.");
                } 
            } 
            return new SecretKeySpec(rawKey, getAlgorithm());
        } finally { 
            zeroFill(rawKey);
        } 
    } 
}