bmd

package
v0.0.0-...-d0e78e6 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	XorKey = []byte{0xFC, 0xCF, 0xAB}
)

Functions

func GetCrcValue

func GetCrcValue(data *[]byte) (res int32, err error)

func GetRowsCount

func GetRowsCount(data *[]byte) (res int32, err error)

func GetVersion

func GetVersion(data *[]byte) (res int16, err error)

func SetCrcValue

func SetCrcValue(file *os.File, buff bytes.Buffer, keyVal uint32) error

func SetRowsCount

func SetRowsCount(file *os.File, count int) error

func SetVersion

func SetVersion(file *os.File, version int) error

Types

type BaseBmdAdapter

type BaseBmdAdapter interface {
	GetStruct() interface{}

	GetVersion(data *[]byte) (res int16, err error)
	GetRowsCount(data *[]byte) (res int32, err error)
	GetCrcValue(data *[]byte) (res int32, err error)

	SetVersion(f *os.File) error
	SetRowsCount(f *os.File, count int) error
	SetCrcValue(f *os.File, b bytes.Buffer) error
}

type BaseBmdInfo

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

func NewBmdInfo

func NewBmdInfo(b BaseBmdAdapter) *BaseBmdInfo

func (BaseBmdInfo) Decrypt

func (b BaseBmdInfo) Decrypt(data []byte, out *os.File) error

func (BaseBmdInfo) Encrypt

func (b BaseBmdInfo) Encrypt(data []byte, out *os.File) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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