func StringToPBKDF2(secret, salt string, iterations int64, e etype.EType) []byte {
	return pbkdf2.Key64([]byte(secret), []byte(salt), iterations, int64(e.GetKeyByteSize()), e.GetHashFunc())
}
StringToPBKDF2 generates an encryption key from a pass phrase and salt string using the PBKDF2 function from PKCS #5 v2.0
package rfc3962
import (
	"encoding/binary"
	"encoding/hex"
	"errors"
	"github.com/jcmturner/gofork/x/crypto/pbkdf2"
	"github.com/jcmturner/gokrb5/v8/crypto/etype"
)
const (
	s2kParamsZero = 4294967296
)
func StringToKey(secret, salt, s2kparams string, e etype.EType) ([]byte, error) {
	i, err := S2KparamsToItertions(s2kparams)
	if err != nil {
		return nil, err
	}
	return StringToKeyIter(secret, salt, i, e)
}