mdFormatXMLgo

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: 5 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 mdFormat object

func (*MdFormat) EncodeBlock

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

this can encode the block as minimal simple, inform, xml this could also add a collision number byte or 4 byte 32-bit integer to specify which collsion is the correct hash block

func (*MdFormat) EncodeEndFile

func (md *MdFormat) EncodeEndFile(encodingFormat int)

this can encode the block as minimal simple, inform, xml

func (*MdFormat) EncodeFileHash

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

print and generate the file signature this is the entire file signature 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)

generate the file signature header 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

also could have a binary encoded signature format for efficiency in size

func (*MdFormat) InitFile

func (md *MdFormat) InitFile()

format init file methods

func (*MdFormat) OpenFile

func (md *MdFormat) OpenFile(appendfile bool)

append to a file or replace the file this is set based on the appendfile boolean if appendfile is true it appends to the file or creates a new file if appendfile is false it replaces the file

func (*MdFormat) PrintFormatType

func (md *MdFormat) PrintFormatType()

test inteface function

func (*MdFormat) Println2

func (md *MdFormat) Println2(line ...interface{})

test interface method

Jump to

Keyboard shortcuts

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