keys

package
v1.1.15 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRoutes

func AddRoutes(sg *echo.Group)

func Create

func Create(ctx context.ServiceContext, client *clients.GQLClient, options *commons.CreateOptions) error

func CreateWithUserID

func CreateWithUserID(ctx context.ServiceContext, client *clients.GQLClient, options *commons.CreateWithUserIDOptions) error

func DecryptAsymmetricallyAnonymous

func DecryptAsymmetricallyAnonymous(public, private, org_key []byte) ([]byte, error)

Decrypt the org's symmetric key with your local public-private key.

func DecryptMemberKey

func DecryptMemberKey(ctx context.ServiceContext, client *clients.GQLClient, user_id string, options *commons.DecryptOptions) ([]byte, error)

func DecryptPayload

func DecryptPayload(payload *commons.Payload, password string) error

func GenerateKeyPair

func GenerateKeyPair(password string) (*commons.IssueKeyPairResponse, error)

func GetByUserID

func GetByUserID(ctx context.ServiceContext, client *clients.GQLClient, user_id string) (*commons.Key, error)

func GetPublicKey

func GetPublicKey(c echo.Context) error

func GetPublicKeyByUserEmail

func GetPublicKeyByUserEmail(ctx context.ServiceContext, client *clients.GQLClient, email string) ([]byte, error)

func GetPublicKeyByUserID

func GetPublicKeyByUserID(ctx context.ServiceContext, client *clients.GQLClient, user_id string) ([]byte, error)

func OpenAsymmetricallyAnonymous

func OpenAsymmetricallyAnonymous(message []byte, publicKey, privateKey [commons.KEY_BYTES]byte) ([]byte, error)

func OpenSymmetrically

func OpenSymmetrically(message []byte, key [commons.KEY_BYTES]byte) ([]byte, error)

func SealAsymmetricallyAnonymous

func SealAsymmetricallyAnonymous(message []byte, key [commons.KEY_BYTES]byte) ([]byte, error)

func SealSymmetrically

func SealSymmetrically(message []byte, key [commons.KEY_BYTES]byte) ([]byte, error)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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