Documentation ¶
Overview ¶
Package algo provides some algorithm utils.
Index ¶
- func B64Encode(b []byte) []byte
- func B64RawDecode(b []byte) ([]byte, error)
- func B64RawEncode(b []byte) []byte
- func Hash256(b []byte) []byte
- func HashBase64SHA256(s string) string
- func HashHexSHA256(s string) string
- func SetIntersection(a, b interface{}, eq func(a, b interface{}) bool) []interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func B64RawDecode ¶ added in v3.0.7
B64RawDecode returns the bytes represented by the base64 encoding of the given byte slice.
func B64RawEncode ¶ added in v3.0.7
B64RawEncode returns the base64 encoding of the given byte slice.
func HashBase64SHA256 ¶
func HashHexSHA256 ¶
func SetIntersection ¶
func SetIntersection(a, b interface{}, eq func(a, b interface{}) bool) []interface{}
SetIntersection complexity: O(n^2), could be better but this is simple enough.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.