Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Unresolved reference mindrot' when importing jbcrypt #4

Open
robert-cronin opened this issue Mar 9, 2019 · 0 comments
Open

'Unresolved reference mindrot' when importing jbcrypt #4

robert-cronin opened this issue Mar 9, 2019 · 0 comments

Comments

@robert-cronin
Copy link

robert-cronin commented Mar 9, 2019

Gradle file looks like this:

dependencies {
    compile group: 'org.mindrot', name: 'jbcrypt', version: '0.4'
    ...
}

Kotlin file where import error occurs looks like this:

...
import org.mindrot.jbcrypt.BCrypt
...

fun ...() {
            // Hash a password for the first time
            val hashed = BCrypt.hashpw(password, BCrypt.gensalt())

            // gensalt's log_rounds parameter determines the complexity
            // the work factor is 2**log_rounds, and the default is 10
            val hashed = BCrypt.hashpw(password, BCrypt.gensalt(12))

            // Check that an unencrypted password matches one that has
            // previously been hashed
            if (BCrypt.checkpw(candidate, hashed))
                System.out.println("It matches")
            else
                System.out.println("It does not match")
}
...
@robert-cronin robert-cronin changed the title Unresolved reference mindrot' 'Unresolved reference mindrot' when importing jbcrypt Mar 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant