Skip to content

'Unresolved reference mindrot' when importing jbcrypt #4

Description

@robert-cronin

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")
}
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions