From 34cb368fbfaeabc11d02cc60791c5495710e4bd0 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sat, 15 Apr 2017 02:59:31 +0200 Subject: Make lint happy --- bhash/bhash.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'bhash/bhash.go') diff --git a/bhash/bhash.go b/bhash/bhash.go index ea3081c..f5fb395 100644 --- a/bhash/bhash.go +++ b/bhash/bhash.go @@ -1,3 +1,7 @@ +// Package bhash implements bcrypt_pbkdf key derivation function compatible to +// OpenBSD implementation +// +// http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libutil/bcrypt_pbkdf.c package bhash import ( @@ -15,6 +19,7 @@ var ( hashSize = words * 4 ) +// Hash computes bcrypt hash func Hash(pass, salt []byte) []byte { c, err := blowfish.NewSaltedCipher(pass, salt) if err != nil { @@ -41,6 +46,7 @@ func Hash(pass, salt []byte) []byte { return buf.Bytes() } +// Pbkdf returns derivated key func Pbkdf(pass, salt []byte, iter, keyLen int) []byte { // collapse password h := sha512.New() -- cgit v1.2.3