Node.js publicEncrypt({ oaepHash }) 会将 OAEP hash 和 MGF1 hash
绑定为同一算法,而 Java OAEPWithSHA-256AndMGF1Padding 默认使用
SHA-256(OAEP) + SHA-1(MGF1)。改用 node-forge 独立配置两个哈希,
确保密文可被管理平台正确解密。
19 lines
361 B
JSON
19 lines
361 B
JSON
{
|
|
"name": "@furtherverse/crypto",
|
|
"version": "1.0.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"exports": {
|
|
".": "./src/index.ts"
|
|
},
|
|
"dependencies": {
|
|
"node-forge": "^1.3.3",
|
|
"openpgp": "catalog:"
|
|
},
|
|
"devDependencies": {
|
|
"@furtherverse/tsconfig": "workspace:*",
|
|
"@types/bun": "catalog:",
|
|
"@types/node-forge": "^1.3.14"
|
|
}
|
|
}
|