mdFormatSQL

package
v0.0.0-...-6c90f4e Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MdFormat

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

func Init

func Init(encodingFormat int, fileName string, filePath string, fileSize uint64, blockSize uint64, modulusSize uint64, fileHashListString string, blockHashListString string, outputfileName string) (mdfmt *MdFormat)

Init returns a new sqlite3 db md file type this writes to the file and block signatures to the sqlite3 db file.

func (*MdFormat) EncodeBlock

func (md *MdFormat) EncodeBlock(encodingFormat int, blockSize uint64, hashList []string, modExp int, mod string)

EncodeBlock add the block signature to the mdfileblocks table in the sqlite3 db

func (*MdFormat) EncodeEndFile

func (md *MdFormat) EncodeEndFile(encodingFormat int)

EncodeEndFile this is the format end file method executed at the end

func (*MdFormat) EncodeFileHash

func (md *MdFormat) EncodeFileHash(encodingFormat int, hashName string, hashBytes string)

EncodeFileHash add the file signature to the mdfilehash sqlite3 table this is the entire file signature file id, hash type, and signature hex bytes

func (*MdFormat) EncodeFileHeader

func (md *MdFormat) EncodeFileHeader(encodingFormat int, fileName string, filePath string, fileSize int64, blockSize int64, filehashList []string, blockhashList []string, modulusSize int64)

EncodeFileHeader add the file signature header to the sqlite3 db it contains the file md format type, filename, filepath, filesize, block signature size, file hash signature list, block hash signature list and modulus bit size it can also add time attribute

func (*MdFormat) InitFile

func (md *MdFormat) InitFile()

InitFile init file methods

func (*MdFormat) OpenFile

func (md *MdFormat) OpenFile(append bool)

OpenFile create the db file handle

func (*MdFormat) PrintFormatType

func (md *MdFormat) PrintFormatType()

test inteface function

func (*MdFormat) SqlCreateTable

func (md *MdFormat) SqlCreateTable()

SqlCreateTable generates the sql to create the md tables

mdfilelist mdfile mdfilehash mdfileblocks mdbyteblocks

Jump to

Keyboard shortcuts

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