utilities

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PickleAsJSON

func PickleAsJSON(object any, pickleVersion byte, key []byte) ([]byte, error)

PickleAsJSON returns an object as a base64 string encrypted using the supplied key. The unencrypted representation of the object is in JSON format.

func Sha256

func Sha256(value []byte) []byte

func UnpickleAsJSON

func UnpickleAsJSON(object any, pickled, key []byte, pickleVersion byte) error

UnpickleAsJSON updates the object by a base64 encrypted string using the supplied key. The unencrypted representation has to be in JSON format.

func VerifySignature

func VerifySignature(message []byte, key id.Ed25519, signature []byte) (ok bool, err error)

VerifySignature verifies an ed25519 signature.

Types

This section is empty.

Jump to

Keyboard shortcuts

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