mirror of https://github.com/minio/minio.git
Merge pull request #221 from fkautz/pr_out_adding_streaming_sha512
This commit is contained in:
commit
9744efc725
|
@ -175,3 +175,13 @@ func Sum(reader io.Reader) ([]byte, error) {
|
|||
}
|
||||
return h.Sum(nil), nil
|
||||
}
|
||||
|
||||
func SumStream(reader io.Reader) ([Size]byte, error) {
|
||||
var returnValue [Size]byte
|
||||
sumSlice, err := Sum(reader)
|
||||
if err != nil {
|
||||
return returnValue, err
|
||||
}
|
||||
copy(returnValue[:], sumSlice)
|
||||
return returnValue, err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue