mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-23 21:04:55 +02:00
fix: use new secrets
This commit is contained in:
7 files changed
+17
-55
No files matched your search
@@ -1,21 +0,0 @@
|
||||
// Copyright 2022 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package secrets
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestEncryptDecrypt(t *testing.T) {
|
||||
provider := NewAesEncryptionProvider()
|
||||
key := []byte("1111111111111111")
|
||||
pri := "vvvvvvv"
|
||||
enc, err := provider.EncryptString(pri, key)
|
||||
assert.NoError(t, err)
|
||||
v, err := provider.DecryptString(enc, key)
|
||||
assert.NoError(t, err)
|
||||
assert.EqualValues(t, pri, v)
|
||||
}
|
||||
Reference in new issue
Block a user