Skip to content

wastedcode/sookie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SecureCookie

Secure cookies in GoLang

Build Status GoDoc

What's a Sookie?

Sookie lets you create Http Cookies where the data stored is serialized, encrypted and signed. Similarly it allows you to decode Http Cookies with such data.

Example Usage

type testingInterface struct {
    Number int
    OtherInfo string
}

testData := testingInterface{ 10, "info"}
secureCookie, err := NewSecureCookieFromData(key, testData)
secureCookie.HttpCookie // has the http cookie with encrypted contents

decryptedValue := testingInterface{}
// Decode the Cookie from above into decryptedValue
_, err = DecodeHttpCookie(key, secureCookie.HttpCookie, &decryptedValue)

About

Secure Cookies in Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages