Documentation
¶
Index ¶
- type Hasher
- func (h *Hasher) ByMd2() *Hasher
- func (h *Hasher) ByMd4() *Hasher
- func (h *Hasher) ByMd5() *Hasher
- func (h *Hasher) ByRipemd160() *Hasher
- func (h *Hasher) BySha1() *Hasher
- func (h *Hasher) BySha2(size int) *Hasher
- func (h *Hasher) BySha3(size int) *Hasher
- func (h *Hasher) FromBytes(b []byte) *Hasher
- func (h *Hasher) FromFile(f fs.File) *Hasher
- func (h *Hasher) FromString(s string) *Hasher
- func (h *Hasher) ToBase64Bytes() []byte
- func (h *Hasher) ToBase64String() string
- func (h *Hasher) ToHexBytes() []byte
- func (h *Hasher) ToHexString() string
- func (h *Hasher) ToRawBytes() []byte
- func (h *Hasher) ToRawString() string
- func (h *Hasher) WithKey(key []byte) *Hasher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hasher ¶
type Hasher struct {
Error error
// contains filtered or unexported fields
}
func (*Hasher) ByRipemd160 ¶
ByRipemd160 encrypts by RIPEMD160 or HMAC-RIPEMD160 based on whether key is set.
func (*Hasher) BySha2 ¶
BySha2 encrypts by SHA2 with specified size (224, 256, 384, 512) or HMAC-SHA2 based on whether key is set.
func (*Hasher) BySha3 ¶
BySha3 encrypts by SHA3 with specified size (224, 256, 384, 512) or HMAC-SHA3 based on whether key is set.
func (*Hasher) FromString ¶
FromString encrypts from string.
func (*Hasher) ToBase64Bytes ¶
ToBase64Bytes outputs as base64 byte slice.
func (*Hasher) ToBase64String ¶
ToBase64String outputs as base64 string.
func (*Hasher) ToHexBytes ¶
ToHexBytes outputs as hex byte slice.
func (*Hasher) ToHexString ¶
ToHexString outputs as hex string.
func (*Hasher) ToRawBytes ¶
ToRawBytes outputs as raw byte slice without encoding.
func (*Hasher) ToRawString ¶
ToRawString outputs as raw string without encoding.
Click to show internal directories.
Click to hide internal directories.