Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateRandomKey ¶
GenerateRandomKey creates a random key with the given length in bytes.
Types ¶
type AspNetCookie ¶
type AspNetCookie struct {
// contains filtered or unexported fields
}
AspNetCookie encodes and decodes authenticated and encrypted cookie values holding a FormsAuthenticationTicket.
func New ¶
func New(hashName string, hashKey []byte, blockName string, blockKey []byte) *AspNetCookie
New returns a new AspNetCookie.
func (*AspNetCookie) Decode ¶
func (s *AspNetCookie) Decode(b []byte) (*FormsAuthenticationTicket, error)
Decode decodes a cookie value.
func (*AspNetCookie) Encode ¶
func (s *AspNetCookie) Encode(value *FormsAuthenticationTicket) ([]byte, error)
Encode encodes a cookie value.
type FormsAuthenticationTicket ¶
type FormsAuthenticationTicket struct {
// contains filtered or unexported fields
}
FormsAuthenticationTicket holds:
func (*FormsAuthenticationTicket) Deserialize ¶
func (t *FormsAuthenticationTicket) Deserialize(buf []byte) (int, error)
Deserialize is
func (*FormsAuthenticationTicket) Serialize ¶
func (t *FormsAuthenticationTicket) Serialize() ([]byte, error)
Serialize is
Click to show internal directories.
Click to hide internal directories.