mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-11 23:07:01 +08:00
fix: Fixed go vet issues. (#658)
* Fixed vet ./... errors. * Fixed ESLint issues.
This commit is contained in:
@@ -66,14 +66,12 @@ func TestDatabaseEncryption(t *testing.T) {
|
||||
|
||||
// TestHybridEncryption 測試混合加密(前端 → 後端場景)
|
||||
func TestHybridEncryption(t *testing.T) {
|
||||
em, err := GetEncryptionManager()
|
||||
_, err := GetEncryptionManager()
|
||||
if err != nil {
|
||||
t.Fatalf("初始化加密管理器失敗: %v", err)
|
||||
}
|
||||
|
||||
// 模擬前端加密私鑰
|
||||
plaintext := "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
|
||||
|
||||
// plaintext := "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
|
||||
// 注意:這裡需要前端的 encryptWithServerPublicKey 實現
|
||||
// 為了測試,我們直接使用後端的加密函數(實際前端使用 Web Crypto API)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user