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(appendfile bool)
- func (md *MdFormat) PrintFormatType()
- func (md *MdFormat) Println2(line ...interface{})
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 ¶
this can encode the block as minimal simple, inform, xml
func (*MdFormat) EncodeFileHash ¶
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