# web-basic-bak202504 **Repository Path**: moses-studio/web-basic ## Basic Information - **Project Name**: web-basic-bak202504 - **Description**: No description available - **Primary Language**: Go - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 5 - **Created**: 2022-11-08 - **Last Updated**: 2025-04-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 项目结构 ```shell ├── cmd │   └── crypto │   └── server ├── pkg │   └── cache │   └── crypto │   └── db │   └── email │   └── file │   └── imangeverificationcode │   └── log │   └── model │   └── sms │   └── uricontrol │   └── util │   └── wssecurity ``` # server ## 目录结构 | 文件夹 | 说明 | 描述 | |----------------|-----------|------------------| | `app` | 代码目录 | 代码目录 | | `--business` | 服务层 | 服务层 | | `--config` | 配置解析 | yaml对应的配置解析 | | `--dao` | dao层 | dao层 | | `--entity` | 模型层 | 模型层 | | `--global` | 全局对象 | 全局对象 | | `--middleware` | 中间件层 | 用于存放 `gin` 中间件代码 | | `--router` | 路由层 | 路由层 | | `--test` | go test目录 | go test目录 | ## WS Security测试取值 ### Authorization 固定值:WSSE profile="UsernameToken" ### X-WSSE ```shell cd pkg/wssecurity/test && go test -run TestCheckNormal -v === RUN TestCheckNormal wssecurity_test.go:31: X-WSSE=[UsernameToken Username="fd930bd9bfe94a89949f1305f989096a", PasswordDigest="2f57ea37affa3434f4d5d1ceb86b2e2c6157b61d8dfc5dd0b6bfb21fc94aad09", Nonce="841eaaf9-50a3-46d6-be31-bc655ed032ad", Created="2022-11-26T16:44:44Z"] --- PASS: TestCheckNormal (0.02s) PASS ok gitee.com/baal1990/gitee.com/baal1990/pkg/wssecurity/test 0.613s ``` # crypto ## asymmetric 非对称加密工具 ```shell asymmetric --help Usage of asymmetric: -data string -gen-key string key path -key string pub.pem/priv.pem -method string encrypt/decrypt/sign/verify -sign string -type string sm2 ``` ## symmetric 对称加密工具 ```shell symmetric --help Usage of symmetric: -data string -key string -method string encrypt/decrypt -type string aes/sm4 ``` ## digest 摘要生成工具 ```shell symmetric --help Usage of symmetric: -data string -type string sm3 ```