mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 23:39:41 +02:00
11 lines
201 B
Go
11 lines
201 B
Go
|
package crypto
|
||
|
|
||
|
import "crypto/md5"
|
||
|
|
||
|
// HashFromBytes returns the hash of the specified data
|
||
|
func HashFromBytes(data []byte) []byte {
|
||
|
digest := md5.New()
|
||
|
digest.Write(data)
|
||
|
return digest.Sum(nil)
|
||
|
}
|