Totalul afișărilor de pagină

duminică, 22 februarie 2015

Easy to use encryption library for java

If you are looking for an easy to user encryption library, the lightest that I found was jcrypt :
<dependency>
    <groupId>org.mindrot</groupId>
    <artifactId>jbcrypt</artifactId>
    <version>0.3m</version>
</dependency>

BCrypt.hashpw(password, BCrypt.gensalt(10));
BCrypt.checkpw(pwd1, pwd2);

I need to  specify that I do not need a very secure one because I am not handling sensitive data.


duminică, 15 februarie 2015

Slf4j compatibility issues with Dropwizard and Hibernate annotations

While writing a project using dropwizard(0.7.1) and hibernate annotations(3.5.5-Final) I ran into a problem with the versions of slf4j which is a dependency of both but with different versions. dropwizard uses v1.7.6 and hibernate uses 1.5.8.

The solution was to add in the pom file the following dependency:
<dependency>
      <groupId>io.dropwizard</groupId>
      <artifactId>dropwizard-core</artifactId>
      <version>0.7.1</version>
      <scope>compile</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-api</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>