decrypt

package
v0.0.0-...-8be0883 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSimpleDBFile

func GetSimpleDBFile(platform string, version int) string

Types

type Decryptor

type Decryptor interface {
	// Decrypt 解密数据库
	Decrypt(ctx context.Context, dbfile string, key string, output io.Writer) error

	// Validate 验证密钥是否有效
	Validate(page1 []byte, key []byte) bool

	// GetPageSize 返回页面大小
	GetPageSize() int

	// GetReserve 返回保留字节数
	GetReserve() int

	// GetHMACSize 返回HMAC大小
	GetHMACSize() int

	// GetVersion 返回解密器版本
	GetVersion() string
}

Decryptor 定义数据库解密的接口

func NewDecryptor

func NewDecryptor(platform string, version int) (Decryptor, error)

NewDecryptor 创建一个新的解密器

type Validator

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

func NewValidator

func NewValidator(platform string, version int, dataDir string) (*Validator, error)

NewValidator 创建一个仅用于验证的验证器

func NewValidatorWithFile

func NewValidatorWithFile(platform string, version int, dataDir string) (*Validator, error)

func (*Validator) Validate

func (v *Validator) Validate(key []byte) bool

func (*Validator) ValidateImgKey

func (v *Validator) ValidateImgKey(key []byte) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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