qjutil 0.0.3 → 0.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/package.json +1 -1
- package/src/util/sign.ts +8 -2
package/package.json
CHANGED
package/src/util/sign.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { Md5 } from 'ts-md5';
|
|
2
|
-
|
|
2
|
+
import {sign} from "node:crypto";
|
|
3
|
+
export default {
|
|
4
|
+
md5:md5,
|
|
5
|
+
raw:raw
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
function md5(str:string){
|
|
3
9
|
return Md5.hashStr(str)
|
|
4
10
|
}
|
|
5
11
|
|
|
6
|
-
|
|
12
|
+
function raw(args:Record<string, any>) {
|
|
7
13
|
let keys = Object.keys(args);
|
|
8
14
|
//参数名ASCII码从小到大排序(字典序)
|
|
9
15
|
keys = keys.sort();
|