bcrypt_pbkdf

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 27, 2026 License: BSD-2-Clause Imports: 3 Imported by: 11 modules, 12 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Go implementation of bcrypt_pbkdf(3) from OpenBSD
(a variant of PBKDF2 with bcrypt-based PRF).


USAGE

  func Key(password, salt []byte, rounds, keyLen int) ([]byte, error)

  
  Key derives a key from the password, salt and rounds count, returning a
  []byte of length keyLen that can be used as cryptographic key.
  
  Remember to get a good random salt of at least 16 bytes.  Using a higher
  rounds count will increase the cost of an exhaustive search but will also
  make derivation proportionally slower.


REFERENCES

* https://web.archive.org/web/20250118034057/https://flak.tedunangst.com/post/bcrypt-pbkdf
* https://cvsweb.openbsd.org/log/src/lib/libutil/bcrypt_pbkdf.c

Documentation

Overview

Package bcrypt_pbkdf implements password-based key derivation function based on bcrypt compatible with bcrypt_pbkdf(3) from OpenBSD.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Key

func Key(password, salt []byte, rounds, keyLen int) ([]byte, error)

Key derives a key from the password, salt and rounds count, returning a []byte of length keyLen that can be used as cryptographic key.

Remember to get a good random salt of at least 16 bytes. Using a higher rounds count will increase the cost of an exhaustive search but will also make derivation proportionally slower.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址