code: func Parse(cookie string, secret []byte) (login string, expires time.Time, err error) {
  	blen := base64.URLEncoding.DecodedLen(len(cookie))
  	// Avoid allocation if cookie is too short or too long.
  	if blen < decodedMinLength || blen > decodedMaxLength {
  		err = ErrMalformedCookie
  		return
  	}
  	b, err := base64.URLEncoding.DecodeString(cookie)
  	if err != nil {
  		return
  	}
  	// Decoded length may be different from max length, which
  	// we allocated, so check it, and set new length for b.
  	blen = len(b)
  	if blen < decodedMinLength {
  		err = ErrMalformedCookie
  		return
  	}
  	b = b[:blen]
  
  	sig := b[blen-32:]
  	data := b[:blen-32]
  
  	realSig := getSignature(data, secret)
  	if subtle.ConstantTimeCompare(realSig, sig) != 1 {
  		err = ErrWrongSignature
  		return
  	}
  	expires = time.Unix(int64(binary.BigEndian.Uint32(data[:4])), 0)
  	login = string(data[4:])
  	return
  }
docs: // Parse verifies the given cookie with the secret key and returns login and
  // expiration time extracted from the cookie. If the cookie fails verification
  // or is not well-formed, the function returns an error.
  //
  // Callers must: 
  //
  // 1. Check for the returned error and deny access if it's present.
  //
  // 2. Check the returned expiration time and deny access if it's in the past.
  //