func Init(cfg *Config, subCfg map[string][]byte) {
	if cfg == nil {
		return
	}
	driverMutex.Lock()
	defer driverMutex.Unlock()
	if len(cfg.EnableTypes) > 0 {
		for _, d := range drivers {
			d.enable = false
		}
		for _, name := range cfg.EnableTypes {
			if d, ok := drivers[name]; ok {
				d.enable = true
			}
		}
	}
	for name, enableHeight := range cfg.EnableHeight {
		if d, ok := drivers[name]; ok && d.enable {
			d.enableHeight = enableHeight
		}
	}
	for name, driver := range drivers {
		if driver.initFunc != nil {
			driver.initFunc(subCfg[name])
		}
	}
}
Init init crypto
package crypto
import (
	"errors"
	"fmt"
	"sync"
)
var (
	ErrNotSupportAggr = errors.New("AggregateCrypto not support")
	ErrSign = errors.New("error signature")
	ErrUnknownDriver = errors.New("ErrUnknownDriver")
	ErrDriverNotEnable = errors.New("ErrUnknownDriver")
)
var (
	drivers     = make(map[string]*Driver)
	driversType = make(map[int32]string)
	driverMutex sync.Mutex
)