func getHash(bytes []byte) []byte {
	h := crypto.SHA256.New()
	h.Write(bytes)  
	return h.Sum(nil)
}
getHash will compute the hash for the supplied bytes using SHA256
package bddtests
import (
	"crypto"
	"encoding/base64"
	"github.com/cucumber/godog"
	"github.com/hyperledger/fabric-protos-go/common"
	pb "github.com/hyperledger/fabric-protos-go/peer"
	"github.com/pkg/errors"
	"github.com/trustbloc/fabric-peer-test-common/bddtests"
)
type OffLedgerSteps struct {
	BDDContext *bddtests.BDDContext
	content    string
	address    string
}
func NewOffLedgerSteps(context *bddtests.BDDContext) *OffLedgerSteps {
	return &OffLedgerSteps{BDDContext: context}
}
func (d *OffLedgerSteps) DefineOffLedgerCollectionConfig(id, name, policy string, requiredPeerCount, maxPeerCount int32, timeToLive string) {
	d.BDDContext.DefineCollectionConfig(id,
		func(channelID string) (*pb.CollectionConfig, error) {
			sigPolicy, err := d.newChaincodePolicy(policy, channelID)
			if err != nil {
				return nil, errors.Wrapf(err, "error creating collection policy for collection [%s]", name)
			}
			return newOffLedgerCollectionConfig(name, requiredPeerCount, maxPeerCount, timeToLive, sigPolicy), nil
		},
	)
}
func (d *OffLedgerSteps) DefineDCASCollectionConfig(id, name, policy string, requiredPeerCount, maxPeerCount int32, timeToLive string) {
	d.BDDContext.DefineCollectionConfig(id,
		func(channelID string) (*pb.CollectionConfig, error) {
			sigPolicy, err := d.newChaincodePolicy(policy, channelID)
			if err != nil {
				return nil, errors.Wrapf(err, "error creating collection policy for collection [%s]", name)
			}
			return newDCASCollectionConfig(name, requiredPeerCount, maxPeerCount, timeToLive, sigPolicy), nil
		},
	)
}
func (d *OffLedgerSteps) setCASVariable(varName, value string) error {
	casKey := GetCASKey([]byte(value))
	bddtests.SetVar(varName, casKey)
	return nil
}