fix: Fixed go vet issues. (#658)

* Fixed vet ./... errors.

* Fixed ESLint issues.
This commit is contained in:
SkywalkerJi
2025-11-07 03:28:01 +09:00
committed by GitHub
parent 40030fd1b6
commit bf0ebf8878
2 changed files with 105 additions and 95 deletions

View File

@@ -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