func (db *Database) Root() *Group {
	return db.root
}
Root returns the root group.
package keepass  
import (
	"bytes"
	"crypto/sha256"
	"encoding/binary"
	"errors"
	"fmt"
	"io"
	"io/ioutil"
	"time"
	"zombiezen.com/go/sandpass/pkg/kdbcrypt"
	"zombiezen.com/go/sandpass/pkg/uuids"
)
type Database struct {
	cparams  kdbcrypt.Params
	staticIV bool
	root     *Group
	groups   map[uint32]*Group
	entries  []*Entry
	meta     []*Entry
	rand     io.Reader
}
func (db *Database) init(g []Group, e []Entry, opts *Options) {
	if db.cparams.ComputedKey == nil {
		panic("key should have been precomputed")
	}
	db.cparams.Key.Password, db.cparams.Key.KeyFileHash = nil, nil
	db.staticIV = opts.staticIV()
	db.groups = make(map[uint32]*Group, len(g))
	db.entries = make([]*Entry, 0, len(e))
	db.rand = opts.getRand()
	db.root = &Group{Name: "Root", db: db}
	for i := range g {
		gg := &g[i]
		db.groups[gg.ID] = gg
	}
	for i := range e {
		ee := &e[i]
		if ee.isMetaStream() {
			db.meta = append(db.meta, ee)
		} else {
			db.entries = append(db.entries, ee)
		}
	}
}
func New(opts *Options) (*Database, error) {
	db := new(Database)
	if err := opts.initCryptParams(&db.cparams); err != nil {
		return nil, err
	}
	db.init(nil, nil, opts)
	return db, nil
}