Skip to content
This repository has been archived by the owner on Aug 20, 2021. It is now read-only.

Commit

Permalink
fix func name
Browse files Browse the repository at this point in the history
  • Loading branch information
unknwon committed Mar 18, 2017
1 parent 9b82b03 commit 46ba718
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions context.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ func (ctx *Context) GetSecureCookie(key string) (string, bool) {
func (ctx *Context) SetSuperSecureCookie(secret, name, value string, others ...interface{}) {
m := md5.Sum([]byte(secret))
secret = hex.EncodeToString(m[:])
text, err := com.AESEncrypt([]byte(secret), []byte(value))
text, err := com.AESGCMEncrypt([]byte(secret), []byte(value))
if err != nil {
panic("error encrypting cookie: " + err.Error())
}
Expand All @@ -424,7 +424,7 @@ func (ctx *Context) GetSuperSecureCookie(secret, key string) (string, bool) {

m := md5.Sum([]byte(secret))
secret = hex.EncodeToString(m[:])
text, err := com.AESDecrypt([]byte(secret), data)
text, err := com.AESGCMDecrypt([]byte(secret), data)
return string(text), err == nil
}

Expand Down

0 comments on commit 46ba718

Please sign in to comment.