@fast-china/utils 2.0.2 → 2.0.3
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/CHANGELOG.md +7 -0
- package/dist/crypto/index.d.mts +3 -3
- package/dist/crypto/index.mjs +4 -4
- package/dist/crypto/index.mjs.map +1 -1
- package/dist/index.global.min.js +1 -1
- package/dist/index.global.min.js.map +1 -1
- package/docs/API.md +1 -1
- package/docs/API.zh-CN.md +1 -1
- package/package.json +1 -1
package/docs/API.md
CHANGED
|
@@ -81,7 +81,7 @@ The TypeScript Crypto public API mirrors the public methods and algorithm casing
|
|
|
81
81
|
| RSA | `GenerateRSAKeyPair`, `RSAEncryptOAEP`, `RSADecryptOAEP`, `RSASignPSS`, `RSAVerifyPSS` |
|
|
82
82
|
| Elliptic curves | `GenerateECDSAKeyPair`, `ECDSASign`, `ECDSAVerify`, `GenerateECDHKeyPair`, `DeriveECDHSecret`, `DeriveECDHKeySHA256` |
|
|
83
83
|
|
|
84
|
-
The Base64 v1 payload produced by `AESEncryptAuthenticated`, the `FAST-AES-256-GCM-
|
|
84
|
+
The Base64 v1 payload produced by `AESEncryptAuthenticated`, the `FAST-AES-256-GCM-V1` password payload, PBKDF2 password hashes, and PKCS#8/SPKI PEM keys interoperate with .NET in both directions. MD5 and HMAC output lowercase hexadecimal; SHA-1/256/384/512 output uppercase hexadecimal, matching .NET.
|
|
85
85
|
|
|
86
86
|
Store passwords with `HashPasswordPBKDF2SHA256` and `VerifyPasswordPBKDF2SHA256`; the result is not decryptable. AES-GCM provides confidentiality and integrity, HMAC authenticates with a shared key, SHA-2 computes digests, and HKDF/PBKDF2 derive keys. MD5, SHA-1, AES-CBC, and AES-ECB do not provide modern password-storage or authenticated-encryption guarantees.
|
|
87
87
|
|
package/docs/API.zh-CN.md
CHANGED
|
@@ -81,7 +81,7 @@ TypeScript Crypto 公共 API 与 .NET `CryptoUtil` 的公开方法及算法名
|
|
|
81
81
|
| RSA | `GenerateRSAKeyPair`、`RSAEncryptOAEP`、`RSADecryptOAEP`、`RSASignPSS`、`RSAVerifyPSS` |
|
|
82
82
|
| 椭圆曲线 | `GenerateECDSAKeyPair`、`ECDSASign`、`ECDSAVerify`、`GenerateECDHKeyPair`、`DeriveECDHSecret`、`DeriveECDHKeySHA256` |
|
|
83
83
|
|
|
84
|
-
`AESEncryptAuthenticated` 的 Base64 v1 载荷、`AESEncryptWithPassword` 的 `FAST-AES-256-GCM-
|
|
84
|
+
`AESEncryptAuthenticated` 的 Base64 v1 载荷、`AESEncryptWithPassword` 的 `FAST-AES-256-GCM-V1` 载荷、PBKDF2 密码哈希以及 PKCS#8/SPKI PEM 密钥均可与 .NET 双向使用。MD5 与 HMAC 输出小写十六进制;SHA-1/256/384/512 输出大写十六进制,与 .NET 保持一致。
|
|
85
85
|
|
|
86
86
|
密码存储使用 `HashPasswordPBKDF2SHA256` 和 `VerifyPasswordPBKDF2SHA256`;该哈希不可解密。需要同时保证机密性和完整性的文本使用 AES-GCM 入口。HMAC 用于共享密钥认证,SHA-2 用于摘要,HKDF/PBKDF2 用于密钥派生。MD5、SHA-1、AES-CBC 和 AES-ECB 不提供现代密码存储或认证加密保证。
|
|
87
87
|
|