Bcrypt Plugin

  • Tags : /
  • Latest : 1.0
  • Last Updated: 28 June 2012
  • Grails version : 2.0 > *
1 vote
Dependency :
compile ":bcrypt:1.0"

Documentation Source Issues

Summary

Simple bcrypt plugin to perform bcrypt hashing.

Installation

grails install-plugin bcrypt

Description

This plugin provides a service class and a codec utility for easy bcrypt hashing.

Salt + MD5 or SHA hashing is typically not secure enough. See here for more details http://codahale.com/how-to-safely-store-a-password

Usage

// inject bcryptService the usual way
def bcryptService

String password = "my password"

// should give you a nice bcrypt hash println password.encodeAsBcrypt()

// same thing but using the service class def x = bcryptService.hashPassword(password)

// if true continue, else bye. assert service.checkPassword(password, *hashed_password*)

Source

https://github.com/seymores/grails-bcrypt