Documentation ¶
Index ¶
- type MdFormat
- func (md *MdFormat) EncodeBlock(encodingFormat int, blockSize uint64, hashList []string, modExp int, ...)
- func (md *MdFormat) EncodeEndFile(encodingFormat int)
- func (md *MdFormat) EncodeFileHash(encodingFormat int, hashName string, hashBytes string)
- func (md *MdFormat) EncodeFileHeader(encodingFormat int, fileName string, filePath string, fileSize int64, ...)
- func (md *MdFormat) InitFile()
- func (md *MdFormat) OpenFile(append bool)
- func (md *MdFormat) PrintFormatType()
- func (md *MdFormat) SqlCreateTable()
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 ¶
EncodeEndFile this is the format end file method executed at the end
func (*MdFormat) EncodeFileHash ¶
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) SqlCreateTable ¶
func (md *MdFormat) SqlCreateTable()
SqlCreateTable generates the sql to create the md tables
mdfilelist mdfile mdfilehash mdfileblocks mdbyteblocks