Documentation ¶
Index ¶
- Constants
- Variables
- func B64Decrypt(ucookie string) ([]byte, error)
- func EncryptBytesToB64(rpad []byte) (string, error)
- func GenerateCookieKey() []byte
- func GetNonceTime(nonce string) (then time.Time, err error)
- func MakeLoginCookie(uid int64) (string, error)
- func Nonce() (nonce string, err error)
- func ParseLogin(ucookie string) (int64, error)
- func SetCookieKey(key []byte) error
- type LoginCookieStruct
Constants ¶
View Source
const CookieKeyByteLen = 16
Variables ¶
View Source
var ErrKeyWrongLength = errors.New("key not 16 bytes")
Functions ¶
func B64Decrypt ¶
func EncryptBytesToB64 ¶
func GenerateCookieKey ¶
func GenerateCookieKey() []byte
Generate a new random key and set it and return it
func MakeLoginCookie ¶
func ParseLogin ¶
func SetCookieKey ¶
Types ¶
type LoginCookieStruct ¶
Click to show internal directories.
Click to hide internal directories.