ont

package
v0.0.0-...-d60aa6c Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptMsg

func DecryptMsg(ecdsaPrivkey *ecdsa.PrivateKey, msg []byte) ([]byte, error)

func EncryptWithDIDPubkey

func EncryptWithDIDPubkey(msg []byte, didpubkey []byte) ([]byte, error)

func PrivateKeyToEcdsaPrivkey

func PrivateKeyToEcdsaPrivkey(data []byte) (*ecdsa.PrivateKey, error)

func UnmarshalPubkey

func UnmarshalPubkey(data []byte) (*ecdsa.PublicKey, error)

Types

type DidPubkey

type DidPubkey struct {
	Id           string      `json:"id"`
	Type         string      `json:"type"`
	Controller   interface{} `json:"controller"`
	PublicKeyHex string      `json:"publicKeyHex"`
}

type OrangeProviderOntSdk

type OrangeProviderOntSdk struct {
	// contains filtered or unexported fields
}

func NewOrangeProviderOntSdk

func NewOrangeProviderOntSdk(walletPath string, pwd string, network string) (*OrangeProviderOntSdk, error)

func (*OrangeProviderOntSdk) DecryptData

func (s *OrangeProviderOntSdk) DecryptData(msg []byte) ([]byte, error)

func (*OrangeProviderOntSdk) EncryptDataWithDID

func (s *OrangeProviderOntSdk) EncryptDataWithDID(data []byte, did string) ([]byte, error)

func (*OrangeProviderOntSdk) GetSelfDID

func (s *OrangeProviderOntSdk) GetSelfDID() string

func (*OrangeProviderOntSdk) SignData

func (s *OrangeProviderOntSdk) SignData(data []byte) ([]byte, error)

func (*OrangeProviderOntSdk) VerifySig

func (s *OrangeProviderOntSdk) VerifySig(did string, msg []byte, sigbytes []byte) (bool, error)

Jump to

Keyboard shortcuts

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