waveenc

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2024 License: Apache-2.0 Imports: 15 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const EncFieldIndicator = "*"
View Source
const EncTagName = "enc"

Variables

This section is empty.

Functions

func ComputeUrlHmac

func ComputeUrlHmac(key []byte, baseUrl string, qvals url.Values) (string, error)

func ValidateUrlHmac

func ValidateUrlHmac(key []byte, baseUrl string, qvalsOrig url.Values) (bool, error)

Types

type EncryptMeta

type EncryptMeta struct {
	EncField    *reflect.StructField
	PlainFields map[string]reflect.StructField
}

type Encryptor

type Encryptor struct {
	Key  []byte
	AEAD cipher.AEAD
}

func MakeEncryptor

func MakeEncryptor(key []byte) (*Encryptor, error)

func MakeEncryptorB64

func MakeEncryptorB64(key64 string) (*Encryptor, error)

func MakeEncryptorEcdh

func MakeEncryptorEcdh(localPrivKey *ecdh.PrivateKey, remotePubKey []byte) (*Encryptor, error)

func MakeRandomEncryptor

func MakeRandomEncryptor() (*Encryptor, error)

func (*Encryptor) DecryptData

func (enc *Encryptor) DecryptData(encData []byte, odata string) ([]byte, error)

func (*Encryptor) DecryptODS

func (enc *Encryptor) DecryptODS(v HasOData) error

func (*Encryptor) DecryptStructFields

func (enc *Encryptor) DecryptStructFields(v interface{}, odata string) error

func (*Encryptor) EncryptData

func (enc *Encryptor) EncryptData(plainText []byte, odata string) ([]byte, error)

func (*Encryptor) EncryptODS

func (enc *Encryptor) EncryptODS(v HasOData) error

func (*Encryptor) EncryptStructFields

func (enc *Encryptor) EncryptStructFields(v interface{}, odata string) error

type HasOData

type HasOData interface {
	GetOData() string
}

Jump to

Keyboard shortcuts

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