aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/minio/md5-simd/md5.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/minio/md5-simd/md5.go')
-rw-r--r--vendor/github.com/minio/md5-simd/md5.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/vendor/github.com/minio/md5-simd/md5.go b/vendor/github.com/minio/md5-simd/md5.go
index 4f56b79d0a..11b0cb962b 100644
--- a/vendor/github.com/minio/md5-simd/md5.go
+++ b/vendor/github.com/minio/md5-simd/md5.go
@@ -27,6 +27,12 @@ type Hasher interface {
Close()
}
+// StdlibHasher returns a Hasher that uses the stdlib for hashing.
+// Used hashers are stored in a pool for fast reuse.
+func StdlibHasher() Hasher {
+ return &md5Wrapper{Hash: md5Pool.New().(hash.Hash)}
+}
+
// md5Wrapper is a wrapper around the builtin hasher.
type md5Wrapper struct {
hash.Hash