func (t *MountTable) Hash() ([]byte, error) {
	buf, err := json.Marshal(t)
	if err != nil {
		return nil, err
	}
	hash := sha1.Sum(buf)
	return hash[:], nil
}
Hash is used to generate a hash value for the mount table
package vault
import (
	"crypto/sha1"
	"encoding/json"
	"errors"
	"fmt"
	"strings"
	"time"
	"github.com/hashicorp/go-uuid"
	"github.com/hashicorp/vault/helper/jsonutil"
	"github.com/hashicorp/vault/logical"
)
const (
	coreMountConfigPath = "core/mounts"
	backendBarrierPrefix = "logical/"
	systemBarrierPrefix = "sys/"
	mountTableType = "mounts"
)
var (
	errLoadMountsFailed = errors.New("failed to setup mount table")
	protectedMounts = []string{
		"audit/",
		"auth/",
		"sys/",
		"cubbyhole/",
	}
	untunableMounts = []string{
		"cubbyhole/",
		"sys/",
		"audit/",
	}
	singletonMounts = []string{
		"cubbyhole",
		"system",
	}
)
type MountTable struct {
	Type    string        `json:"type"`
	Entries []*MountEntry `json:"entries"`
}
func (t *MountTable) shallowClone() *MountTable {
	mt := &MountTable{
		Type:    t.Type,
		Entries: make([]*MountEntry, len(t.Entries)),
	}
	for i, e := range t.Entries {
		mt.Entries[i] = e
	}
	return mt
}