uadp

package
v0.0.0-...-c5429dd Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AesContext

type AesContext struct {
}

func NewAesContext

func NewAesContext() *AesContext

func (*AesContext) Decrypt

func (ctx *AesContext) Decrypt(src []byte, key []byte) ([]byte, error)

func (*AesContext) Encrypt

func (ctx *AesContext) Encrypt(src []byte, key []byte) ([]byte, error)

func (*AesContext) GenKey

func (ctx *AesContext) GenKey() []byte

func (*AesContext) Padding

func (ctx *AesContext) Padding(src []byte, blockSize int) []byte

func (*AesContext) Unpadding

func (ctx *AesContext) Unpadding(src []byte) []byte

type CryptoContext

type CryptoContext struct {
	PrimaryIndex C.uint
	KeyIndex     C.uint
	UUID         string
	// contains filtered or unexported fields
}

func NewCryptoContext

func NewCryptoContext() *CryptoContext

创建一个加解密上下文

func (*CryptoContext) Available

func (ctx *CryptoContext) Available() bool

判断是否可用

func (*CryptoContext) CreateKey

func (ctx *CryptoContext) CreateKey() bool

创建密钥

func (*CryptoContext) Decrypt

func (ctx *CryptoContext) Decrypt(data []byte) []byte

进行解密

func (*CryptoContext) DeleteKey

func (ctx *CryptoContext) DeleteKey()

删除密钥

func (*CryptoContext) Encrypt

func (ctx *CryptoContext) Encrypt(data []byte) []byte

进行加密

func (*CryptoContext) Free

func (ctx *CryptoContext) Free()

释放上下文

func (*CryptoContext) Load

func (ctx *CryptoContext) Load(file string) bool

加载密钥

func (*CryptoContext) Save

func (ctx *CryptoContext) Save(file string) bool

保存密钥

type Daemon

type Daemon struct {
	*loader.ModuleBase
	// contains filtered or unexported fields
}

func NewDaemon

func NewDaemon(logger *log.Logger) *Daemon

func (*Daemon) GetDependencies

func (d *Daemon) GetDependencies() []string

func (*Daemon) Start

func (d *Daemon) Start() (err error)

func (*Daemon) Stop

func (d *Daemon) Stop() error

type Data

type Data struct {
	AesKey []byte
	File   string
}

type DataManager

type DataManager struct {
	Data ProcessMap
}

func NewDataManager

func NewDataManager(dir string) *DataManager

func (*DataManager) DeleteData

func (dm *DataManager) DeleteData(process string, name string)

func (*DataManager) DeleteProcess

func (dm *DataManager) DeleteProcess(process string)

func (*DataManager) GetData

func (dm *DataManager) GetData(process string, name string) ([]byte, []byte, error)

func (*DataManager) ListName

func (dm *DataManager) ListName(process string) []string

func (*DataManager) Load

func (dm *DataManager) Load(file string) bool

func (*DataManager) Save

func (dm *DataManager) Save(file string) error

func (*DataManager) SetData

func (dm *DataManager) SetData(dir string, process string, name string, aesKey []byte, data []byte) error

type Manager

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

func (*Manager) Available

func (m *Manager) Available() (bool, *dbus.Error)

func (*Manager) Delete

func (m *Manager) Delete(sender dbus.Sender, name string) *dbus.Error

func (*Manager) Get

func (m *Manager) Get(sender dbus.Sender, name string) ([]byte, *dbus.Error)

func (*Manager) GetExportedMethods

func (v *Manager) GetExportedMethods() dbusutil.ExportedMethods

func (*Manager) GetInterfaceName

func (*Manager) GetInterfaceName() string

func (*Manager) ListName

func (m *Manager) ListName(sender dbus.Sender) ([]string, *dbus.Error)

func (*Manager) Release

func (m *Manager) Release(sender dbus.Sender) *dbus.Error

func (*Manager) Set

func (m *Manager) Set(sender dbus.Sender, name string, data []byte) *dbus.Error

type ProcessData

type ProcessData = map[string]Data

data name => data file path

type ProcessMap

type ProcessMap = map[string]ProcessData

process exe path => ProcessData

Jump to

Keyboard shortcuts

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