frostfs-sdk-go/checksum/test/generate.go
Alex Vanin 94476f9055 Rename package name
Due to source code relocation from GitHub.

Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2023-03-07 15:47:21 +03:00

21 lines
306 B
Go

package checksumtest
import (
"crypto/sha256"
"math/rand"
"git.frostfs.info/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
}