Co-authored-by: Kevin Wan <wanjunfeng@gmail.com>
This commit is contained in:
chen quan
2023-04-23 22:22:03 +08:00
committed by GitHub
parent 9970ff55cd
commit ce4eb6ed61
5 changed files with 67 additions and 8 deletions

View File

@@ -2,6 +2,7 @@ package codec
import (
"encoding/base64"
"os"
"testing"
"github.com/stretchr/testify/assert"
@@ -41,6 +42,7 @@ func TestCryption(t *testing.T) {
file, err := fs.TempFilenameWithText(priKey)
assert.Nil(t, err)
defer os.Remove(file)
dec, err := NewRsaDecrypter(file)
assert.Nil(t, err)
actual, err := dec.Decrypt(ret)