func NewDigest(record []byte) Digest {
	context := &argon2.Context{
		Iterations:  digestIterations,
		Memory:      digestMemory,
		Parallelism: digestParallelism,
		HashLen:     Length,
		Mode:        digestMode,
		Version:     digestVersion,
	}
	hash, err := argon2.Hash(context, record, record)
	logger.PanicIfError("block.NewDigest", err)
	var digest Digest
	copy(digest[:], hash)
	return digest
}
NewDigest - create a digest from a byte slice
package blockdigest
import (
	"encoding/hex"
	"fmt"
	"math/big"
	"github.com/bitmark-inc/bitmarkd/chain"
	"github.com/bitmark-inc/bitmarkd/difficulty"
	"github.com/bitmark-inc/bitmarkd/fault"
	"github.com/bitmark-inc/go-argon2"
	"github.com/bitmark-inc/logger"
)
const Length = 32
const (
	digestMode        = argon2.ModeArgon2d
	digestMemory      = 1 << 17  
	digestParallelism = 1
	digestIterations  = 4
	digestVersion     = argon2.Version13
)
type Digest [Length]byte