Documentation ¶
Index ¶
- type HashContextList
- func (hc *HashContextList) CalcHashBlockSize(hashlist string, mdtype int) (uint64, []int)
- func (hc *HashContextList) CalcHashBlockSizeBlockList(hashlist string) (uint64, []int)
- func (hc *HashContextList) CalcHashBlockSizeFileList(hashlist string) (uint64, []int)
- func (hc *HashContextList) CheckFileHashBlock(byteblock []byte) bool
- func (hc *HashContextList) CheckKeyError(key string, keyval string, err error)
- func (hc *HashContextList) CreateHashListMap(hashList string, mdtype int, threadNumber int)
- func (hc *HashContextList) GetBlockHash() []string
- func (hc *HashContextList) GetBlockHashBytes() []byte
- func (hc *HashContextList) GetFileHashBlockSigBytes(byteblock []byte) []string
- func (hc *HashContextList) SetBlockHash(byteblock []byte)
- func (hc *HashContextList) SetFileHashBlock(byteblock []byte)
- func (hc *HashContextList) SetHashListKey(keylist string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HashContextList ¶
type HashContextList struct { MdBlockSize *mdSignatureList.BlockList // hash map // // hash list for files HashList map[string]hash.Hash // hash context signature list for files or blocks HashListBlocks map[string]hash.Hash // hash context count HashListFileSize int HashListBlockSize int // contains filtered or unexported fields }
HashContextList object stores the file signature hash context list
func (*HashContextList) CalcHashBlockSize ¶
func (hc *HashContextList) CalcHashBlockSize(hashlist string, mdtype int) (uint64, []int)
CalcHashBlockSize takes a hashlist colon separated string of hash names
It calculates the total blocksize and a array of the hash signature block sizes this allows mdprint or mdunzip to decode each signature block and calculate their size returns blocksize and the blocksize array for each block
func (*HashContextList) CalcHashBlockSizeBlockList ¶
func (hc *HashContextList) CalcHashBlockSizeBlockList(hashlist string) (uint64, []int)
CalcHashBlockSizeBlockList takes a hashlist colon separated string of hash names
It calculates the total blocksize and a array of the hash signature block sizes this allows mdprint or mdunzip to decode each signature block and calculate their size returns blocksize and the blocksize array for each block
func (*HashContextList) CalcHashBlockSizeFileList ¶
func (hc *HashContextList) CalcHashBlockSizeFileList(hashlist string) (uint64, []int)
CalcHashBlockSizeFileList takes a hashlist colon separated string of hash names
It calculates the total blocksize and a array of the hash signature block sizes this allows mdprint or mdunzip to decode each signature block and calculate their size returns blocksize and the blocksize array for each block
func (*HashContextList) CheckFileHashBlock ¶
func (hc *HashContextList) CheckFileHashBlock(byteblock []byte) bool
CheckFileHashBlock compares the current modulus scan byte block with the hash byte block at position start to end the hash byte block is the entire signature block [0:20]sha1[21:40]ripe160
func (*HashContextList) CheckKeyError ¶
func (hc *HashContextList) CheckKeyError(key string, keyval string, err error)
Check if a Signature Key Returns an error
func (*HashContextList) CreateHashListMap ¶
func (hc *HashContextList) CreateHashListMap(hashList string, mdtype int, threadNumber int)
createHashListMap create the hash context hash list map need to incorporate the thread number has to be either a thread list for each or a key_threadnumber create 16 hashlist context objects for each thread once
func (*HashContextList) GetBlockHash ¶
func (hc *HashContextList) GetBlockHash() []string
Get the current Block Hash List Names more of a test function
func (*HashContextList) GetBlockHashBytes ¶
func (hc *HashContextList) GetBlockHashBytes() []byte
GetBlockHashBytes return the current mdzip block hash signature block bytes
func (*HashContextList) GetFileHashBlockSigBytes ¶
func (hc *HashContextList) GetFileHashBlockSigBytes(byteblock []byte) []string
GetFileHashBlockSigBytes creates a list with the signature name and hash block signature bytes Example: [aes8 80696185b5b00db8 blake2s_128 d26d0d2d40f394e279ab14f6f1bb4dde]
func (*HashContextList) SetBlockHash ¶
func (hc *HashContextList) SetBlockHash(byteblock []byte)
sets the current mdzip file block hash signature block bytes this is the list of signature bytes
func (*HashContextList) SetFileHashBlock ¶
func (hc *HashContextList) SetFileHashBlock(byteblock []byte)
sets the current mdzip file hash signature block bytes this is the list of signature bytes
func (*HashContextList) SetHashListKey ¶
func (hc *HashContextList) SetHashListKey(keylist string) string
Set the Hash List Key should return a string not sure if I need this it's so that if a default is used it will specify it in the mdunzip key list