|
|
@ -23,6 +23,7 @@ var SHA256Regex = regexp.MustCompile("^(?P<hash>[0-9a-f]{64}) (?P<filename>.*)$ |
|
|
|
var SHA384Regex = regexp.MustCompile("^(?P<hash>[0-9a-f]{96}) (?P<filename>.*)$") |
|
|
|
var SHA384Regex = regexp.MustCompile("^(?P<hash>[0-9a-f]{96}) (?P<filename>.*)$") |
|
|
|
var SHA512Regex = regexp.MustCompile("^(?P<hash>[0-9a-f]{128}) (?P<filename>.*)$") |
|
|
|
var SHA512Regex = regexp.MustCompile("^(?P<hash>[0-9a-f]{128}) (?P<filename>.*)$") |
|
|
|
var SHA512_224Regex = SHA224Regex |
|
|
|
var SHA512_224Regex = SHA224Regex |
|
|
|
|
|
|
|
var SHA512_256Regex = SHA256Regex |
|
|
|
|
|
|
|
|
|
|
|
// SumFunc is a type of function that computes a hash.Hash for data in io.Reader
|
|
|
|
// SumFunc is a type of function that computes a hash.Hash for data in io.Reader
|
|
|
|
type SumFunc func(io.Reader) (hash.Hash, error) |
|
|
|
type SumFunc func(io.Reader) (hash.Hash, error) |
|
|
@ -62,6 +63,10 @@ func SHA512_224Sum(r io.Reader) (hash.Hash, error) { |
|
|
|
return copyIntoHash(r, sha512.New512_224()) |
|
|
|
return copyIntoHash(r, sha512.New512_224()) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func SHA512_256Sum(r io.Reader) (hash.Hash, error) { |
|
|
|
|
|
|
|
return copyIntoHash(r, sha512.New512_256()) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
type CheckingResults struct { |
|
|
|
type CheckingResults struct { |
|
|
|
ImproperlyFormattedCount uint |
|
|
|
ImproperlyFormattedCount uint |
|
|
|
InvalidChecksumCount uint |
|
|
|
InvalidChecksumCount uint |
|
|
|