Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsMd5Valid ¶
Simple function that allows verification that a string is in fact a valid MD5 formated string.
func IsSha1Valid ¶
Simple function that allows verification that a string is in fact a valid sha1 formated string.
func IsSha256Valid ¶
Simple function that allows verification that a string is in fact a valid SHA256 formated string.
func IsSha512Valid ¶
Simple function that allows verification that a string is in fact a valid SHA512 formated string.
Types ¶
type Md5Reader ¶
type Md5Reader struct {
// contains filtered or unexported fields
}
Intermediate Reader object that will calculate the MD5 value of the data that passes through it.
func (Md5Reader) Close ¶
func (m Md5Reader) Close() error
Closes the source, if it implements io.Closer.
func (Md5Reader) Length ¶
func (m Md5Reader) Length() int64
Returns the number of bytes passed through this reader.
type Sha1Reader ¶
type Sha1Reader struct {
// contains filtered or unexported fields
}
Intermediate Reader object that will calculate the SHA1 value of the data that passes through it.
func (Sha1Reader) Close ¶
func (m Sha1Reader) Close() error
Closes the source, if it implements io.Closer.
func (Sha1Reader) Length ¶
func (m Sha1Reader) Length() int64
Returns the number of bytes passed through this reader.
func (Sha1Reader) Read ¶
Reads from the source, and returns the values upstream after adding the data to the hash.
func (*Sha1Reader) Sha1 ¶
func (s *Sha1Reader) Sha1() string
Returns the SHA1 for all data that has been passed through this Reader already. This should ideally be called after the Reader is Closed, but otherwise its safe to call any time.
type Sha256Reader ¶
type Sha256Reader struct {
// contains filtered or unexported fields
}
Intermediate Reader object that will calculate the SHA256 value of the data that passes through it.
func (Sha256Reader) Close ¶
func (m Sha256Reader) Close() error
Closes the source, if it implements io.Closer.
func (Sha256Reader) Length ¶
func (m Sha256Reader) Length() int64
Returns the number of bytes passed through this reader.
func (Sha256Reader) Read ¶
Reads from the source, and returns the values upstream after adding the data to the hash.
func (*Sha256Reader) Sha256 ¶
func (s *Sha256Reader) Sha256() string
Returns the SHA256 for all data that has been passed through this Reader already. This should ideally be called after the Reader is Closed, but otherwise its safe to call any time.
type Sha512Reader ¶
type Sha512Reader struct {
// contains filtered or unexported fields
}
Intermediate Reader object that will calculate the SHA512 value of the data that passes through it.
func (Sha512Reader) Close ¶
func (m Sha512Reader) Close() error
Closes the source, if it implements io.Closer.
func (Sha512Reader) Length ¶
func (m Sha512Reader) Length() int64
Returns the number of bytes passed through this reader.
func (Sha512Reader) Read ¶
Reads from the source, and returns the values upstream after adding the data to the hash.
func (*Sha512Reader) Sha512 ¶
func (s *Sha512Reader) Sha512() string
Returns the SHA512 for all data that has been passed through this Reader already. This should ideally be called after the Reader is Closed, but otherwise its safe to call any time.