decryptionKeyPkg

package
v0.0.0-...-98a7bba Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateKeysForUser

func CreateKeysForUser(ctx app.Context, userID app.ID, privateKeySalt []byte, privateKey Key, recoveryKeys []Key) error

Types

type DecryptionKey

type DecryptionKey struct {
	entityPkg.Entity
	UserID              app.ID
	PrivateKeySalt      Salt
	EncryptedPrivateKey Key
	DecryptionKeyType   DecryptionKeyType
}

func FetchPrivateKeyForUser

func FetchPrivateKeyForUser(ctx app.Context, userID app.ID) (DecryptionKey, error)

type DecryptionKeyType

type DecryptionKeyType string
const (
	DecryptionKeyTypePrivate  DecryptionKeyType = "private"
	DecryptionKeyTypeRecovery DecryptionKeyType = "recovery"
)

func (DecryptionKeyType) String

func (dkt DecryptionKeyType) String() string

type Key

type Key []byte

func NewKeyFromEncoded

func NewKeyFromEncoded(encoded string) (Key, error)

func (Key) URLEncode

func (k Key) URLEncode() string

type Salt

type Salt []byte

func NewSaltFromEncoded

func NewSaltFromEncoded(encoded string) (Salt, error)

func (Salt) URLEncode

func (s Salt) URLEncode() string

Jump to

Keyboard shortcuts

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