后台面板

This commit is contained in:
2025-06-09 12:34:52 +08:00
parent 89bade9232
commit 19c82817ba
375 changed files with 20628 additions and 11903 deletions

View File

@@ -20,7 +20,7 @@ func Example() {
fmt.Println("链式MD5:", chainHash)
// 使用盐值
saltedHash := md5.EncryptStringWithSalt("password123", "user@example.com")
saltedHash := md5.EncryptStringWithSalt("password123", "main@example.com")
fmt.Println("加盐MD5:", saltedHash)
// 验证哈希
@@ -63,9 +63,9 @@ func ExampleMD5_Sum() {
func ExampleEncryptStringWithSalt() {
// 为用户密码加盐,通常使用用户唯一标识(如邮箱)作为盐值
hash := md5.EncryptStringWithSalt("password123", "user@example.com")
hash := md5.EncryptStringWithSalt("password123", "main@example.com")
fmt.Println("盐值哈希长度:", len(hash))
fmt.Println("是否为有效哈希:", md5.VerifyMD5WithSalt("password123", "user@example.com", hash))
fmt.Println("是否为有效哈希:", md5.VerifyMD5WithSalt("password123", "main@example.com", hash))
// Output:
// 盐值哈希长度: 32
// 是否为有效哈希: true