AKushWarrior / steel_crypt

A collection of high-level API's exposing PointyCastle to perform hashing and encrypting in popular/secure algorithms.
https://pub.dev/packages/steel_crypt
Mozilla Public License 2.0
40 stars 10 forks source link

Cannot call has pass in PBKDF2 mode #38

Closed gabrielchiquini closed 4 years ago

gabrielchiquini commented 4 years ago

I am getting the error Unhandled Exception: type 'ScryptParameters' is not a subtype of type 'Pbkdf2Parameters' of 'params' in version 2.0.0 beta. I've found a possible cause in code. On file lib/src/encoded/pass.dart, the algorithm for PBKDF2 is set as P, on line 49, but on line 61 the code is checking if algorithm contains PBKDF2, which will never be true, because it's set with P, then the error occurs. I think this can be a bug.

AKushWarrior commented 4 years ago

This is why we have beta. Somehow, this passed me by. I'll add it to my to-do list.

gabrielchiquini commented 4 years ago

Thank you, I will use scrypt for while.

AKushWarrior commented 4 years ago

This is done in the latest commit. Will upload to pub.dev in a minute.

gabrielchiquini commented 4 years ago

Thank you for solving this quick