mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2026-01-02 12:03:16 -06:00
add vendor directory
This commit is contained in:
parent
9cfbfcdc42
commit
d9026c7798
2666 changed files with 1090740 additions and 0 deletions
25
vendor/github.com/gorilla/securecookie/fuzz.go
generated
vendored
Normal file
25
vendor/github.com/gorilla/securecookie/fuzz.go
generated
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
// +build gofuzz
|
||||
|
||||
package securecookie
|
||||
|
||||
var hashKey = []byte("very-secret12345")
|
||||
var blockKey = []byte("a-lot-secret1234")
|
||||
var s = New(hashKey, blockKey)
|
||||
|
||||
type Cookie struct {
|
||||
B bool
|
||||
I int
|
||||
S string
|
||||
}
|
||||
|
||||
func Fuzz(data []byte) int {
|
||||
datas := string(data)
|
||||
var c Cookie
|
||||
if err := s.Decode("fuzz", datas, &c); err != nil {
|
||||
return 0
|
||||
}
|
||||
if _, err := s.Encode("fuzz", c); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return 1
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue