func RegisterKDF(oid asn1.ObjectIdentifier, params func() KDFParameters) {
	kdfs[oid.String()] = params
}
RegisterKDF registers a function that returns a new instance of the given KDF
parameters. This allows the library to support client-provided KDFs.
package pkcs8
import (
	"crypto"
	"crypto/ecdsa"
	"crypto/rand"
	"crypto/rsa"
	"crypto/x509"
	"crypto/x509/pkix"
	"encoding/asn1"
	"errors"
	"fmt"
)
var DefaultOpts = &Opts{
	Cipher: AES256CBC,
	KDFOpts: PBKDF2Opts{
		SaltSize:       8,
		IterationCount: 10000,
		HMACHash:       crypto.SHA256,
	},
}
type KDFOpts interface {
	DeriveKey(password, salt []byte, size int) (key []byte, params KDFParameters, err error)
	GetSaltSize() int
	OID() asn1.ObjectIdentifier
}
type KDFParameters interface {
	DeriveKey(password []byte, size int) (key []byte, err error)
}
var kdfs = make(map[string]func() KDFParameters)