Documentation ¶
Index ¶
- type Crypto
- func (c Crypto) CreateHMAC(ctx context.Context, algorithm string, key interface{}) *Hasher
- func (*Crypto) CreateHash(ctx context.Context, algorithm string) *Hasher
- func (c Crypto) HexEncode(ctx context.Context, data interface{}) string
- func (c *Crypto) Hmac(ctx context.Context, algorithm string, key, input interface{}, ...) interface{}
- func (c *Crypto) Md4(ctx context.Context, input interface{}, outputEncoding string) interface{}
- func (c *Crypto) Md5(ctx context.Context, input interface{}, outputEncoding string) interface{}
- func (*Crypto) RandomBytes(ctx context.Context, size int) []byte
- func (c *Crypto) Ripemd160(ctx context.Context, input interface{}, outputEncoding string) interface{}
- func (c *Crypto) Sha1(ctx context.Context, input interface{}, outputEncoding string) interface{}
- func (c *Crypto) Sha256(ctx context.Context, input interface{}, outputEncoding string) interface{}
- func (c *Crypto) Sha384(ctx context.Context, input interface{}, outputEncoding string) interface{}
- func (c *Crypto) Sha512(ctx context.Context, input interface{}, outputEncoding string) interface{}
- func (c *Crypto) Sha512_224(ctx context.Context, input interface{}, outputEncoding string) interface{}
- func (c *Crypto) Sha512_256(ctx context.Context, input interface{}, outputEncoding string) interface{}
- type Hasher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Crypto ¶
type Crypto struct{}
func (Crypto) CreateHMAC ¶ added in v0.17.0
CreateHMAC returns a new HMAC hash using the given algorithm and key.
func (*Crypto) CreateHash ¶
CreateHash returns a Hasher instance that uses the given algorithm.
func (Crypto) HexEncode ¶ added in v0.24.0
HexEncode returns a string with the hex representation of the provided byte array or ArrayBuffer.
func (*Crypto) Hmac ¶ added in v0.17.0
func (c *Crypto) Hmac( ctx context.Context, algorithm string, key, input interface{}, outputEncoding string, ) interface{}
Hmac returns a new HMAC hash of input using the given algorithm and key in the given encoding.
func (*Crypto) RandomBytes ¶ added in v0.24.0
RandomBytes returns random data of the given size.
func (*Crypto) Ripemd160 ¶
func (c *Crypto) Ripemd160(ctx context.Context, input interface{}, outputEncoding string) interface{}
Ripemd160 returns the RIPEMD160 hash of input in the given encoding.
Click to show internal directories.
Click to hide internal directories.