Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Go bcrypt library
C Go Assembly
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
LICENSE
Makefile
README-OpenWall
README.md
TODO.md
bcrypt.go
bcrypt_test.go
crypt_blowfish.c
crypt_blowfish.h
crypt_gensalt.c
crypt_gensalt.h
ow-crypt.h
wrapper.c
x86.S

README.md

BCrypt Readme

BCrypt is a go package that provides bcrypt password hashing functions for Go. It does this by wrapping an existing C implementation of bcrypt and providing a thread-safe Go binding to it.

Interface (API)

func Crypt(plain string, salt BcryptSalt) (hashed string, err error)
func Verify(plain string, hashed string) (match bool, err error)
func GenSalt(cost uint) (salt BcryptSalt, err error)
type BcryptSalt string

Why BCrypt?

The advantage of bcrypt for password hashing over other algorithms is that bcrypt is designed to be slow and for the slowness to be a fundamental and controllable part of the algorithm. This is a desirable feature as computers are continually getting faster, that makes brute-force attacks more viable over time as more passwords can be tried per second. Bcrypt is future proof as you simply give it a larger work factor, which makes it slower.

The original paper for bcrypt can be found at: http://www.usenix.org/events/usenix99/provos.html

Acknowledgements

The vast bulk of this package is the C implementation of bcrypt (version 1.2). This was written by Solar Design (http://www.openwall.com/crypt/).

Get involved!

We are happy to receive bug reports, fixes, documentation enhancements, and other improvements.

Please report bugs via the github issue tracker.

Master git repository:

  • git clone git://github.com/memcachier/examples-bcrypt.git

License

  • This library is released under the BSD-3 licence.
  • The OpenWall C BCrypt library (version 1.2) is public domain.
Something went wrong with that request. Please try again.