mirror of
https://github.com/minio/minio.git
synced 2024-12-28 08:05:55 -05:00
18 lines
240 B
Go
18 lines
240 B
Go
package api
|
|
|
|
import (
|
|
"encoding/base64"
|
|
"strings"
|
|
)
|
|
|
|
func isValidMD5(md5 string) bool {
|
|
if md5 == "" {
|
|
return true
|
|
}
|
|
_, err := base64.StdEncoding.DecodeString(strings.TrimSpace(md5))
|
|
if err != nil {
|
|
return false
|
|
}
|
|
return true
|
|
}
|