auth

package
v0.0.0-...-001208e Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SESSION_DIR = config.SESSION_DIR

Functions

func Decode

func Decode(key string) ([]byte, error)

decode from custom hex format to bytes

func Encode

func Encode(pubKey []byte) string

TODO: rewrite to be a method of a sctuct encrypt onion pub key to hex format example of access key format: AB3D-E2FA-...

Types

type Auth

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

func New

func New(crypter interfaces.Symmetric, session string) (*Auth, error)

func NewFromKey

func NewFromKey(crypter interfaces.Symmetric, accessKey, password string) (*Auth, error)

func (*Auth) AccessKey

func (a *Auth) AccessKey() string

func (*Auth) Decrypt

func (a *Auth) Decrypt(ciphertext []byte) ([]byte, error)

func (*Auth) DecryptWithPassword

func (a *Auth) DecryptWithPassword(ciphertext []byte, password string) ([]byte, error)

for testing

func (*Auth) Encrypt

func (a *Auth) Encrypt(data []byte) ([]byte, error)

func (*Auth) EncryptWithPassword

func (a *Auth) EncryptWithPassword(data []byte, password string) ([]byte, error)

for testing

func (*Auth) Onion

func (a *Auth) Onion() interfaces.Onioner

func (*Auth) OnionAddress

func (a *Auth) OnionAddress() string

func (*Auth) OnionAddressFull

func (a *Auth) OnionAddressFull() string

func (*Auth) Password

func (a *Auth) Password() string

func (*Auth) Save

func (a *Auth) Save() error

save to a session file

func (*Auth) String

func (a *Auth) String() string

Jump to

Keyboard shortcuts

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