seed: Index | Files

package password

import ""


Package Files


type Hash Uses

type Hash string

Hash is a base64 encoded 256-bit password with entropy distributed across 256 bits. The passwordbox HashAndGo method can derive a password on the client side that is suitable as an input to this function.

func (Hash) Key Uses

func (hash Hash) Key() ([32]byte, error)

Key returns the 256-bit key encoded in this hash.

func (Hash) PasswordFor Uses

func (hash Hash) PasswordFor(username string) (string, error)

PasswordFor returns the username encrypted with the password encoded as base64.

func (Hash) VerifyFor Uses

func (hash Hash) VerifyFor(username, password string) bool

VerifyFor verifies a previous result of a hash.PasswordFor result.

Package password imports 9 packages (graph). Updated 2019-10-19. Refresh now. Tools for package owners.