Skip to content

LachlanMac/securecookie

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

securecookie 2

Build Status

This is a fork of gorilla/securecookie that addresses a non-trivial performance issue:

Implementation time/op mem/op allocs/op
gorilla/securecookie 75,275 ns 21,396 B 369
philhofer/securecookie 17,483 ns 3,198 B 33
delta -76.7% -85.0% -91.0%

The difference in performance comes from avoiding the re-allocation of the gob.Encoder and gob.Decoder types. In order to accomodate this change, a backwards-incompatible change had to be made to the API: all used types need to be Register()ed with a new cookie in order for it to properly handle gob-encoded values from other cookies. This implementation will not be able to decode "old" cookies, as encoding/gob treats extra data (superfluous type annotations) as an error.

Documentation

Full documentation at godoc.

About

(Faster) fork of gorilla/securecookie

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%