Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( HashEncoding = NewEncoding(encoderHash) Base64Encoding = NewEncoding(encoderBase64) )
Functions ¶
This section is empty.
Types ¶
type Encoding ¶
type Encoding struct {
// contains filtered or unexported fields
}
Encoding implements alphabet-specific actions useful to hashes.
func NewEncoding ¶
NewEncoding returns a new Encoding defined by the given alphabet.
func (Encoding) Decode ¶
Decode returns the index of c in the e alphabet, or 0xFF if c is not present in the e alphabet.
func (Encoding) Encode ¶
Encode returns the character representing the c index of the e alphabet or 0xFF if the c index is not present in the e alphabet.
func (Encoding) IndexAnyInvalid ¶
IndexAnyInvalid returns the byte index of the first occurrence in b of any byte not from the e alphabet. It returns -1 if there is no invalid byte in b.
Click to show internal directories.
Click to hide internal directories.