Git Product home page Git Product logo

jbcrypt's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jbcrypt's Issues

Build failed: Source option 6 is no longer supported. Use 7 or later.

% ant      
Buildfile: /Users/markbucciarelli/src/github/jBCrypt/build.xml

init:

build:
    [javac] build.xml:20: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 1 source file to /Users/markbucciarelli/src/github/jBCrypt/build
    [javac] 
    [javac]           WARNING
    [javac] 
    [javac] The -source switch defaults to 9 in JDK 9.
    [javac] If you specify -target 1.6 you now must also specify -source 1.6.
    [javac] Ant will implicitly add -source 1.6 for you.  Please change your build file.
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 6
    [javac] error: Source option 6 is no longer supported. Use 7 or later.
    [javac] error: Target option 6 is no longer supported. Use 7 or later.

BUILD FAILED
build.xml:20: Compile failed; see the compiler error output for details.

Total time: 0 seconds

% ant -version
Apache Ant(TM) version 1.10.12 compiled on October 13 2021

% java -version
java version "17.0.5" 2022-10-18 LTS
Java(TM) SE Runtime Environment (build 17.0.5+9-LTS-191)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.5+9-LTS-191, mixed mode, sharing)

% 

'Unresolved reference mindrot' when importing jbcrypt

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

Invalid salt revision

jBCrypt is not compatible with bCrypt hashes generated by other implementations, e.g. PHP or https://bcrypt-generator.com/

Caused by: java.lang.IllegalArgumentException: Invalid salt revision
at org.mindrot.jbcrypt.BCrypt.hashpw(BCrypt.java:665)
at org.mindrot.jbcrypt.BCrypt.checkpw(BCrypt.java:764)

e.g. "test" might be hashed as "$2y$10$h5jWvguJlBPJ8/1KkOBRGeApm9dj0430qnHK5iRp4lb2dBL4DhfnK"

jBcrypt expects a hash to start with $2a ..

General question: are you still supporting this library? The repository looks very outdated (last commits years ago..).

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.