style: 移除aes随机字节序列的代码

This commit is contained in:
TsMask
2024-04-19 20:16:54 +08:00
parent 5797646647
commit d164dc7ca5

View File

@@ -1,7 +1,6 @@
package machine
import (
"crypto/rand"
"encoding/json"
"fmt"
"hash/fnv"
@@ -112,18 +111,6 @@ func Launch() {
}
codeFileWrite(LaunchInfo)
} else {
// 创建一个用于存储密钥的字节数组
key := make([]byte, 32)
// 使用crypto/rand包生成安全的随机字节序列
_, err := rand.Read(key)
if err != nil {
fmt.Println("Error generating random key:", err)
return
}
// 将随机生成的字节序列作为密钥打印出来
fmt.Printf("Generated AES-256 key: %x\n", key)
// 读取记录文件
data, err := codeFileRead()
if err != nil {