func (f *SWFactory) Get(swOpts *SwOpts) (bccsp.BCCSP, error) {
	if swOpts == nil {
		return nil, errors.New("Invalid config. It must not be nil.")
	}
	var ks bccsp.KeyStore
	if swOpts.Ephemeral == true {
		ks = sw.NewDummyKeyStore()
	} else if swOpts.FileKeystore != nil {
		fks, err := sw.NewFileBasedKeyStore(nil, swOpts.FileKeystore.KeyStorePath, false)
		if err != nil {
			return nil, errors.Wrapf(err, "Failed to initialize software key store")
		}
		ks = fks
	} else {
		ks = sw.NewDummyKeyStore()
	}
	return sw.New(swOpts.SecLevel, swOpts.HashFamily, ks)
}
Get returns an instance of BCCSP using Opts.
package sw
import (
	"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/bccsp"
	"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/bccsp/sw"
	"github.com/pkg/errors"
)
const (
	SoftwareBasedFactoryName = "SW"
)
type SWFactory struct{}
func (f *SWFactory) Name() string {
	return SoftwareBasedFactoryName
}