func (cfg TokenizerConfig) NewTokenizer(key interface{}) (*JwtTokenizer, error) {
	if err := cfg.validate(key); err != nil {
		return nil, fmt.Errorf("creating tokenizer: validation: %w", err)
	}
	t := JwtTokenizer{
		method:          jwt.SigningMethodHS256,
		key:             key,
		TokenizerConfig: cfg,
	}
	return &t, nil
}
// NewTokenizer creates a Tokenizer that users the random number generator to generate tokens.
NewTokenizer creates a Tokenizer that users the random number generator to generate tokens.
// NewTokenizer creates a Tokenizer that users the random number generator to generate tokens .
func (cfg TokenizerConfig) NewTokenizer(key interface{}) (*JwtTokenizer, error) {
	if err := cfg.validate(key); err != nil {
		return nil, fmt.Errorf("creating tokenizer: validation: %w", err)
	}
	t := JwtTokenizer{
		method:          jwt.SigningMethodHS256,
		key:             key,
		TokenizerConfig: cfg,
	}
	return &t, nil
}
func ( cfg TokenizerConfig ) NewTokenizer ( key interface { } ) ( * JwtTokenizer , error ) { if err := cfg . validate ( key ) ; err != nil { return nil , fmt . Errorf ( " " , err ) } t := JwtTokenizer { method : jwt . SigningMethodHS256 , key : key , TokenizerConfig : cfg , } return & t , nil }
NewTokenizer creates a Tokenizer that users the random number generator to generate tokens.
NewTokenizer creates a Tokenizer that users the random number generator to generate tokens .