func New(login string, expires time.Time, secret []byte) string {
	return newCookie(login, expires, secret, false)
}
New returns a signed authentication cookie for the given login,
expiration time, and secret key.
If the login is empty, the function returns an empty string.
package authcookie
import (
	"crypto/hmac"
	"crypto/sha256"
	"crypto/subtle"
	"encoding/base64"
	"encoding/binary"
	"errors"
	"strings"
	"time"
)
const (
	decodedMinLength = 4   + 1   + 32  
	decodedMaxLength = 1024                                 
)
var MinLength = base64.URLEncoding.EncodedLen(decodedMinLength)
var MinLengthNoPadding = base64.RawURLEncoding.EncodedLen(decodedMinLength)
func getSignature(b []byte, secret []byte) []byte {
	keym := hmac.New(sha256.New, secret)
	keym.Write(b)
	m := hmac.New(sha256.New, keym.Sum(nil))
	m.Write(b)
	return m.Sum(nil)
}
var (
	ErrMalformedCookie = errors.New("malformed cookie")
	ErrWrongSignature  = errors.New("wrong cookie signature")
)