func (s *Service) VerifyAndDecode(signed string) (string, error) {
	decodedSessionValueBytes, err := decode([]byte(signed))
	if err != nil {
		return "", err
	}
	if len(decodedSessionValueBytes) <= 36 {
		return "", ErrInvalidSession
	}
	sessionIDBytes := decodedSessionValueBytes[:36]
	hmacBytes := decodedSessionValueBytes[36:]
	verified := verifyHMAC(&sessionIDBytes, &hmacBytes, &s.options.Key)
	if !verified {
		return "", ErrInvalidSession
	}
	return string(sessionIDBytes[:]), nil
}
VerifyAndDecode takes in a signed session string and returns a sessionID, only if the signed string passes
auth verification.
package auth
import (
	"errors"
)
var (
	ErrNoSessionKey = errors.New("no session key")
	ErrMalformedSession = errors.New("malformed session")
	ErrInvalidSession = errors.New("invalid session")
)
type Service struct {
	options Options
}
type Options struct {
	Key []byte
}
func New(options Options) (*Service, error) {
	if len(options.Key) == 0 {
		return nil, ErrNoSessionKey
	}
	return &Service{
		options: options,
	}, nil
}
func (s *Service) SignAndBase64Encode(sessionID string) (string, error) {
	userSessionIDBytes := []byte(sessionID)
	signedBytes := signHMAC(&userSessionIDBytes, &s.options.Key)
	sessionValBytes := make([]byte, len(userSessionIDBytes)+len(signedBytes))
	sessionValBytes = append(userSessionIDBytes, signedBytes...)
	return string(encode(sessionValBytes)[:]), nil
}