algo

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2021 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Overview

Package algo implement common api

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hash

func Hash(method, val string) string

Hash Generate a hex hash value, expects: md5, sha1, sha224, sha256, sha384, sha512.

func Hmac

func Hmac(method, key, val string) string

Hmac Generate a hex hash value with the key, expects: hmacmd5, hmacsha1, hmacsha224, hmacsha256, hmacsha384, hmacsha512.

func MD5

func MD5(s string) string

MD5 calculate the md5 hash of a hex string.

func SHA1

func SHA1(s string) string

SHA1 calculate the sha1 hash of a hex string.

func SHA256

func SHA256(s string) string

SHA256 calculate the sha256 hash of a hex string.

func SHA512

func SHA512(s string) string

SHA512 calculate the sha512 hash of a hex string.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL