signing

package
v0.0.0-...-6c1762c Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const RedactionV1 = RedactionAlgorithm("v1")

Variables

This section is empty.

Functions

func CalculateSha256ContentHash

func CalculateSha256ContentHash(ev interface{}) (string, error)

func DecodeUnpaddedBase64String

func DecodeUnpaddedBase64String(val string) ([]byte, error)

func EncodeCanonicalJson

func EncodeCanonicalJson(obj map[string]interface{}) ([]byte, error)

func EncodeUnpaddedBase64ToString

func EncodeUnpaddedBase64ToString(val []byte) string

func GetSignatureOfObject

func GetSignatureOfObject(obj interface{}, key ed25519.PrivateKey) (string, error)

func RedactObject

func RedactObject(obj interface{}, algorithm RedactionAlgorithm) (map[string]interface{}, map[string]interface{}, error)

func SignEvent

func SignEvent(obj interface{}, domain string, keyId models.KeyID, key ed25519.PrivateKey) (map[string]interface{}, error)

func SignObject

func SignObject(obj map[string]interface{}, domain string, keyId models.KeyID, key ed25519.PrivateKey) (map[string]interface{}, error)

func VerifySignatures

func VerifySignatures(obj interface{}, publicKeys map[string]map[string]ed25519.PublicKey) error

Types

type RedactionAlgorithm

type RedactionAlgorithm string

Jump to

Keyboard shortcuts

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