Git Product home page Git Product logo

flutter_bcrypt's People

Contributors

flawnn avatar jeroentrappers avatar ziakhan110 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

flutter_bcrypt's Issues

Authentication incompatibility between platforms

I have a problem using the bcrypt hash for authentication between Android and IOS platforms. The code I use works for IOS but does not work for Android. The hahs have a different standard of android for IOS, the library generates a hash with initials $ 2a for IOS and for android $ 2b. I found it very strange that the same code works for IOS and for Android not. interesting that in the case of the hash generated for android with the initials $ 2b I can authenticate the user with it if I change the initials of the hash to $ 2a. I can't understand why it generates different password patterns between the platforms but only one of the patterns works, maybe it's a configuration problem, so I'll leave the specifications in case someone is willing to help me and thank you in advance.

** Code snippet using Bcrypt: **
image

NOTE: the server uses this same configuration as Bcrypt.

example of hash generated for IOS: $2a$10$prQYpugK9/r8mqyagF93FehEOsxeFSSixNLfsPURagyXqN1FAJn9a

example of hash generated for Android: $2b$10$zZUCr6112k86MvYCU48/tOFO7cbvKP3yXREt9grHbCqq3sKWpGHFa

pubspec.yaml:
image

pubspec.lock:
image

Podfile.lock
image

Build failed on example

I try to use example file and it is generate build error:
Running Gradle task 'assembleDebug'...
e: D:\flutter.pub-cache\hosted\pub.dartlang.org\flutter_bcrypt-1.0.5\android\src\main\kotlin\be\appmire\flutter_bcrypt\FlutterBcryptPlugin.kt: (138, 31): Type mismatch: inferred type is String? but String was expected

FAILURE: Build failed with an exception.

error in ios

CocoaPods could not find compatible versions for pod "flutter_bcrypt":
In Podfile:
flutter_bcrypt (from .symlinks/plugins/flutter_bcrypt/ios)

Specs satisfying the flutter_bcrypt (from .symlinks/plugins/flutter_bcrypt/ios) dependency were found, but they required a higher minimum deployment target.

migrating the plugin to the V2 embedding

The plugin flutter_bcrypt uses a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to see if this plugin supports the Android V2 embedding. Otherwise, consider removing
it since a future release of Flutter will remove these deprecated APIs.
If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration .

Taking much time on iOS

Generating hash of password using 'hashPw' is taking much time on iOS, aprox. 19s.
On Android it's working fine.

final password = "my_s3cret_p@ssw0rd";

var salt10 = inputUser.cryptoSalt;
print("--- salt10 " + salt10);

var pwh10 = await FlutterBcrypt.hashPw(password: password, salt: salt10);
print("--- pwh10 " + pwh10);

Captura2 de Pantalla 2020-07-30 a la(s) 20 04 01

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.