Documentation ¶
Overview ¶
Package password manipulates passwords stored in Modular Crypt Format.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeBase64 ¶
EncodeBase64 encodes the input bytes into standard base64 format.
Types ¶
type ErrorInputPassword ¶
ErrorInputPassword is returned for input passwords that fail validation. The struct can be examined for a possible solution.
func (ErrorInputPassword) Error ¶
func (e ErrorInputPassword) Error() string
type Passwd ¶
type Passwd struct { Name []byte Params []byte Salt []byte Key []byte // Encoder is a function that encodes Salt and Key into serialized form // Defaults to EncoderBase64, but can be changed to EncoderHex or other function. Encoder func([]byte) []byte // Decoder deserializes the Salt and Key fields. // The default recognizes Base64 or Hex. // If you replace Encoder with something else, replace Decoder too, possibly with a fallback to the // default. Decoder func([]byte) ([]byte, error) }
Passwd is a password separated into components
Click to show internal directories.
Click to hide internal directories.