diff options
author | Hank Shen <swh@admpub.com> | 2023-12-06 06:05:58 +0300 |
---|---|---|
committer | Hank Shen <swh@admpub.com> | 2023-12-06 06:05:58 +0300 |
commit | 3faf6fc167dd8a00d6516ad3ad70012869348603 (patch) | |
tree | 6cd4ac2a8ecdf240e8c01967fc8ff4855e52747f /securecookie.go | |
parent | f14b1ebae207764cbbbfe6ca658aaf4873522948 (diff) |
Revert "Update securecookie.go"v1.2.2
This reverts commit f14b1ebae207764cbbbfe6ca658aaf4873522948.
Diffstat (limited to 'securecookie.go')
-rw-r--r-- | securecookie.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/securecookie.go b/securecookie.go index 97f0847..ab708a3 100644 --- a/securecookie.go +++ b/securecookie.go @@ -118,8 +118,6 @@ type Codec interface { Decode(name, value string, dst interface{}, maxAge ...int) error } -var DefaultMaxLength = 1024 * 1024 // 1M - // New returns a new SecureCookie. // // hashKey is required, used to authenticate values using HMAC. Create it using @@ -140,7 +138,7 @@ func New(hashKey, blockKey []byte) *SecureCookie { blockKey: blockKey, hashFunc: sha256.New, maxAge: 86400 * 30, - maxLength: DefaultMaxLength, + maxLength: 4096, sz: GobEncoder{}, } if len(hashKey) == 0 { |