Documentation ¶
Overview ¶
Package mrhash implements the mailru hash, which is a modified SHA1. If file size is less than or equal to the SHA1 block size (20 bytes), its hash is simply its data right-padded with zero bytes. Hash sum of a larger file is computed as a SHA1 sum of the file data bytes concatenated with a decimal representation of the data length.
Index ¶
Constants ¶
View Source
const ( // BlockSize of the checksum in bytes. BlockSize = sha1.BlockSize // Size of the checksum in bytes. Size = sha1.Size )
Variables ¶
View Source
var (
ErrorInvalidHash = errors.New("invalid hash")
)
Global errors
Functions ¶
func DecodeString ¶
DecodeString converts a string to the Mailru hash
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.