common

package
v0.0.0-...-bfc8ed9 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetKey

func GetKey(cmd *cobra.Command, keyFlagName, keyEnvKey, keyFileFlagName, keyFileEnvKey string,
	password []byte, privateKey bool) (interface{}, error)

GetKey get key

func GetServices

func GetServices(serviceFilePath string) ([]docdid.Service, error)

GetServices get services

func GetVDRPublicKeysFromFile

func GetVDRPublicKeysFromFile(publicKeyFilePath string) (*docdid.Doc, error)

GetVDRPublicKeysFromFile get public keys from file

func ParsePrivateKey

func ParsePrivateKey(der []byte) (crypto.PrivateKey, error)

ParsePrivateKey parse private key

func PrivateKeyFromFile

func PrivateKeyFromFile(file string, password []byte) (crypto.PrivateKey, error)

PrivateKeyFromFile private key from file

func PrivateKeyFromPEM

func PrivateKeyFromPEM(privateKeyPEM, password []byte) (crypto.PrivateKey, error)

PrivateKeyFromPEM private key pem

func PublicKeyFromFile

func PublicKeyFromFile(file string) (crypto.PublicKey, error)

PublicKeyFromFile public key from file

func PublicKeyFromPEM

func PublicKeyFromPEM(pubKeyPEM []byte) (crypto.PublicKey, error)

PublicKeyFromPEM public key from pem

Types

type PublicKey

type PublicKey struct {
	ID       string   `json:"id,omitempty"`
	Type     string   `json:"type,omitempty"`
	Purposes []string `json:"purposes,omitempty"`
	JWKPath  string   `json:"jwkPath,omitempty"`
}

PublicKey struct

Jump to

Keyboard shortcuts

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