Documentation
¶
Overview ¶
Package algo implement common api
Index ¶
- func AddSlashes(s string) string
- func Hash(method Method, s string) string
- func Hmac(method Method, s, key string) string
- func MD5(s string) string
- func QuoteMeta(s string) string
- func SHA1(s string) string
- func SHA256(s string) string
- func SHA512(s string) string
- func StripSlashes(s string) string
- type Method
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddSlashes ¶
AddSlashes returns a string with backslashes added before characters that need to be escaped.
func Hmac ¶
Hmac Generate a hex hash value with the key, expects: MD5, SHA1, SHA224, SHA256, SHA384, SHA512.
func QuoteMeta ¶
QuoteMeta returns a version of str with a backslash character (\) before every character that is among these: . \ + * ? [ ^ ] ( $ )
func StripSlashes ¶
StripSlashes returns a string with backslashes stripped off. (\' becomes ' and so on.) Double backslashes (\\) are made into a single backslash (\).
Types ¶
Click to show internal directories.
Click to hide internal directories.