util

package
v0.0.0-...-84fc3e2 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: MIT, Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func B64SHA3_256

func B64SHA3_256(msg []byte) []byte

func Base64Decode

func Base64Decode(encoded []byte) ([]byte, error)

func Base64DecodeForJWT

func Base64DecodeForJWT(encoded []byte) ([]byte, error)

func Base64Encode

func Base64Encode(decoded []byte) []byte

func Base64EncodeForJWT

func Base64EncodeForJWT(decoded []byte) []byte

func GenKeyPair

func GenKeyPair(alg jwa.KeyAlgorithm) (crypto.Signer, error)

func JoinBytes

func JoinBytes(sep byte, things ...[]byte) []byte

func JoinJWTSegments

func JoinJWTSegments(segments ...[]byte) []byte

func OpenUrl

func OpenUrl(url string) error

https://stackoverflow.com/questions/39320371/how-start-web-server-to-open-page-in-browser-in-golang open opens the specified URL in the default browser of the user.

func ReadSKFile

func ReadSKFile(fpath string) (*ecdsa.PrivateKey, error)

func SKToX509Bytes

func SKToX509Bytes(sk *ecdsa.PrivateKey) ([]byte, error)

func WriteSKFile

func WriteSKFile(fpath string, sk *ecdsa.PrivateKey) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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