frostfs-sdk-go/checksum/test/generate.go
Pavel Karpy 4c779423f5 Move to frostfs-sdk-go
Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
2022-12-14 09:59:29 +03:00

21 lines
300 B
Go

package checksumtest
import (
"crypto/sha256"
"math/rand"
"github.com/TrueCloudLab/frostfs-sdk-go/checksum"
)
// Checksum returns random checksum.Checksum.
func Checksum() checksum.Checksum {
var cs [sha256.Size]byte
rand.Read(cs[:])
var x checksum.Checksum
x.SetSHA256(cs)
return x
}