I'm trying to run an isolate to run my offline hashing auth function. I'm condensing all the data into one list, then I'm assigning it in the function.
For some strange reason the 2nd loop runs and the other 2 don't. The first two were created to solve the third not running, now the first doesn't run either. What am I missing here? I've never seen a loop not run without errors thrown.
Future<bool> offlineAuthenticationThread(List<Tuple2<String, String>> storedCredentials) async {
print('Isolate running');
final DBCrypt hashing = DBCrypt();
bool authorized = false;
String userName = storedCredentials[0].item1;
String password = storedCredentials[0].item2;
List<String> usernameHashes = [];
List<String> passwordHashes = [];
storedCredentials.removeAt(0);
for (var index = 0; index >= storedCredentials.length; index++) {
print('1');
usernameHashes.add(storedCredentials[index].item1);
passwordHashes.add(storedCredentials[index].item2);
}
for (var index = 0; index >= usernameHashes.length; index++) {
print('2');
(hashing.checkpw(userName, usernameHashes[index]) && hashing.checkpw(password, passwordHashes[index]))
? authorized = true
: authorized = false;
}
for (var index = 1; index >= storedCredentials.length; index++) {
print('3');
(hashing.checkpw(userName, storedCredentials[index].item1) &&
hashing.checkpw(password, storedCredentials[index].item2))
? authorized = true
: authorized = false;
}
return authorized;
}