tools_batch_files 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  │ log.txt 日志
5
5
  │ 点我批量上传视频.bat 可执行文件
6
6
 
7
- ├─excel 表格文件夹
7
+ ├─excel\excel.xlsx 表格文件
8
8
 
9
9
  ├─imgs 图片物料
10
10
  │ miz-watermark.png 水印图片
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tools_batch_files",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "批处理视频工具",
5
5
  "keywords": [
6
6
  "utils",
@@ -30,6 +30,7 @@
30
30
  "imgs",
31
31
  "点我批量上传视频.bat",
32
32
  "package.json",
33
- "package-lock.json"
33
+ "package-lock.json",
34
+ "utils"
34
35
  ]
35
36
  }
package/utils/index.js ADDED
@@ -0,0 +1,15 @@
1
+ const crypto = require('crypto');
2
+
3
+ function generateUniqueHash() {
4
+ // 生成一个随机的 UUID
5
+ const uuid = crypto.randomBytes(16).toString('hex');
6
+
7
+ // 使用 SHA256 算法计算哈希值
8
+ const hash = crypto.createHash('sha256').update(uuid).digest('hex');
9
+
10
+ return hash;
11
+ }
12
+
13
+ const uniqueHash = generateUniqueHash();
14
+
15
+ module.exports = generateUniqueHash;