stamper

package
v0.0.0-...-e2c7029 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2016 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Stamper implements a password-based key derivation function to stamp user-supplied content, for example to provide a secure hash of a user supplied password.

Index

Constants

This section is empty.

Variables

View Source
var ErrStamp = errors.New("stamper: stamping failed, check your input parameters.")

Functions

This section is empty.

Types

type Bulla

type Bulla struct {
	Content []byte
	Salt    []byte
}

Bulla is the name for the hash returned by the stamp function. The Bulla can be used as a `key` in symmetric encryption.

type Scrypt

type Scrypt struct {
	// n and r control scrypt's memory requirements
	N int
	R int
	// p controls whether scrypt can run on multiple processors
	P int
	// length in bytes
	Length                int
	EntropyImplementation entropy.Entropy
}

func (*Scrypt) Stamp

func (s *Scrypt) Stamp(postage mailbag.Postage) (*mailbag.Bulla, error)

type Stamper

type Stamper interface {
	Stamp(mailbag.Postage) (*mailbag.Bulla, error)
}

Jump to

Keyboard shortcuts

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