func (id Identity) String() string {
	return id.UniqueID()
}
String returns a string representation of this identity
package view
import (
	"bytes"
	"crypto/sha256"
	"encoding/base64"
)
type Identity []byte
func (id Identity) Equal(id2 Identity) bool {
	return bytes.Equal(id, id2)
}
func (id Identity) UniqueID() string {
	if len(id) == 0 {
		return "<empty>"
	}
	hash := sha256.New()
	n, err := hash.Write(id)
	if n != len(id) {
		panic("hash failure")
	}
	if err != nil {
		panic(err)
	}
	digest := hash.Sum(nil)
	return base64.StdEncoding.EncodeToString(digest)
}