mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2026-10-20 00:39:48 +02:00
resolve cipher deprecation and update mapstructures v2
Signed-off-by: Jan Larwig <jan@larwig.com>
This commit is contained in:
@@ -4,7 +4,7 @@ import (
|
||||
"reflect"
|
||||
"time"
|
||||
|
||||
"github.com/mitchellh/mapstructure"
|
||||
"github.com/go-viper/mapstructure/v2"
|
||||
)
|
||||
|
||||
// Duration is an alias for time.Duration so that we can ensure the marshalling
|
||||
|
||||
@@ -79,7 +79,7 @@ func (c *cfbCipher) Decrypt(ciphertext []byte) ([]byte, error) {
|
||||
|
||||
iv, ciphertext := ciphertext[:aes.BlockSize], ciphertext[aes.BlockSize:]
|
||||
plaintext := make([]byte, len(ciphertext))
|
||||
stream := cipher.NewCFBDecrypter(c.Block, iv) //nolint:staticcheck
|
||||
stream := cipher.NewCFBEncrypter(c.Block, iv) //nolint:staticcheck
|
||||
stream.XORKeyStream(plaintext, ciphertext)
|
||||
|
||||
return plaintext, nil
|
||||
|
||||
Reference in New Issue
Block a user