Remove check narrowing todos, they are handled

This commit is contained in:
Ugljesa Jovanovic 2022-03-25 12:54:47 +01:00
parent ec19c02a42
commit 80c84a25d4
No known key found for this signature in database
GPG Key ID: 178E6DFCECCB0E0F
2 changed files with 4 additions and 4 deletions

View File

@ -64,5 +64,5 @@ class PasswordHashTest {
//TODO strNeedsRehash -1 case?
}
}
}

View File

@ -29,7 +29,7 @@ actual object PasswordHash {
outputLength,
password.encodeToUByteArray().toUInt8Array(),
salt.toUInt8Array(),
opsLimit.toInt(), // TODO check this narrowing
opsLimit.toInt(),
memLimit,
algorithm
).toUByteArray()
@ -51,7 +51,7 @@ actual object PasswordHash {
}
return getSodium().crypto_pwhash_str(
password.encodeToUByteArray().toUInt8Array(),
opslimit.toInt(), // TODO check this narrowing
opslimit.toInt(),
memlimit
).encodeToUByteArray()
}
@ -73,7 +73,7 @@ actual object PasswordHash {
return if (
getSodium().crypto_pwhash_str_needs_rehash(
passwordHash.asByteArray().decodeToString(),
opslimit.toInt(), // TODO check this narrowing
opslimit.toInt(),
memlimit
)
) {