MCPcopy
hub / github.com/oauth2-proxy/oauth2-proxy / encrypt

Function encrypt

pkg/cookies/csrf.go:307–313  ·  view source on GitHub ↗
(data []byte, opts *options.Cookie)

Source from the content-addressed store, hash-verified

305}
306
307func encrypt(data []byte, opts *options.Cookie) ([]byte, error) {
308 cipher, err := makeCipher(opts)
309 if err != nil {
310 return nil, err
311 }
312 return cipher.Encrypt(data)
313}
314
315func decrypt(data []byte, opts *options.Cookie) ([]byte, error) {
316 cipher, err := makeCipher(opts)

Callers 1

encodeCookieMethod · 0.85

Calls 2

makeCipherFunction · 0.85
EncryptMethod · 0.65

Tested by

no test coverage detected