algo

package
v3.11.1 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package algo provides some algorithm utils.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func B64Encode added in v3.0.7

func B64Encode(b []byte) []byte

B64Encode returns the base64 encoding of the given byte slice.

func B64RawDecode added in v3.0.7

func B64RawDecode(b []byte) ([]byte, error)

B64RawDecode returns the bytes represented by the base64 encoding of the given byte slice.

func B64RawEncode added in v3.0.7

func B64RawEncode(b []byte) []byte

B64RawEncode returns the base64 encoding of the given byte slice.

func Hash256

func Hash256(b []byte) []byte

func HashBase64SHA256

func HashBase64SHA256(s string) string

func HashHexSHA256

func HashHexSHA256(s string) string

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.

Jump to

Keyboard shortcuts

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