@hlw-uni-mp/request 1.0.11 → 1.0.13
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/dist/index.d.mts +14 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.js +143 -116
- package/dist/index.mjs +142 -116
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -243,6 +243,19 @@ interface UploadFileParams {
|
|
|
243
243
|
*/
|
|
244
244
|
declare function encryptRsa(plaintext: string, publicKey: string): string;
|
|
245
245
|
|
|
246
|
+
/**
|
|
247
|
+
* RSA + AES 工业级混合加密(方案1:一次一密,极速安全)
|
|
248
|
+
* 1. 动态生成 16 字节随机 AES Key 与 16 字节 IV
|
|
249
|
+
* 2. 使用服务端 RSA-2048 公钥加密该对称密钥对(仅 33 字节,单块免分段)
|
|
250
|
+
* 3. 使用 AES-128-CBC 极速加密真实数据
|
|
251
|
+
* 4. 组装为 [RSA加密的Key:IV].[AES加密数据] 两段式密文
|
|
252
|
+
*
|
|
253
|
+
* @param plaintext 明文字符串(支持 UTF-8 多字节 JSON)
|
|
254
|
+
* @param publicKey 服务端 RSA 公钥
|
|
255
|
+
* @returns 两段式混合加密 Base64 密文
|
|
256
|
+
*/
|
|
257
|
+
declare function encryptHybrid(plaintext: string, publicKey: string): string;
|
|
258
|
+
|
|
246
259
|
/**
|
|
247
260
|
* 请求上传凭证
|
|
248
261
|
* @param data 签名请求参数
|
|
@@ -338,4 +351,4 @@ declare function setupHttp(options?: Partial<HttpOptions>): typeof http;
|
|
|
338
351
|
*/
|
|
339
352
|
declare function getHttpOptions(): HttpOptions;
|
|
340
353
|
|
|
341
|
-
export { type AliossUploadSign, type ApiRes, type ApiResData, type AxiosResponse, type DeviceInfo, type HttpConfig, HttpError, type HttpMethod, type HttpOptions, type HttpResponse, type InterceptorHandler, type LocalUploadSign, type QiniuUploadSign, type RequestConfig, type SignOptions, type UploadFileParams, type UploadSign, type UploadSignBase, calculateSign, client, request as default, del, doUpload, encryptRsa, get, getClient, getDevice, getHttpOptions, http, post, postUploadSign, put, request, setupHttp, sha256, sortString, uploadFile };
|
|
354
|
+
export { type AliossUploadSign, type ApiRes, type ApiResData, type AxiosResponse, type DeviceInfo, type HttpConfig, HttpError, type HttpMethod, type HttpOptions, type HttpResponse, type InterceptorHandler, type LocalUploadSign, type QiniuUploadSign, type RequestConfig, type SignOptions, type UploadFileParams, type UploadSign, type UploadSignBase, calculateSign, client, request as default, del, doUpload, encryptHybrid, encryptRsa, get, getClient, getDevice, getHttpOptions, http, post, postUploadSign, put, request, setupHttp, sha256, sortString, uploadFile };
|
package/dist/index.d.ts
CHANGED
|
@@ -243,6 +243,19 @@ interface UploadFileParams {
|
|
|
243
243
|
*/
|
|
244
244
|
declare function encryptRsa(plaintext: string, publicKey: string): string;
|
|
245
245
|
|
|
246
|
+
/**
|
|
247
|
+
* RSA + AES 工业级混合加密(方案1:一次一密,极速安全)
|
|
248
|
+
* 1. 动态生成 16 字节随机 AES Key 与 16 字节 IV
|
|
249
|
+
* 2. 使用服务端 RSA-2048 公钥加密该对称密钥对(仅 33 字节,单块免分段)
|
|
250
|
+
* 3. 使用 AES-128-CBC 极速加密真实数据
|
|
251
|
+
* 4. 组装为 [RSA加密的Key:IV].[AES加密数据] 两段式密文
|
|
252
|
+
*
|
|
253
|
+
* @param plaintext 明文字符串(支持 UTF-8 多字节 JSON)
|
|
254
|
+
* @param publicKey 服务端 RSA 公钥
|
|
255
|
+
* @returns 两段式混合加密 Base64 密文
|
|
256
|
+
*/
|
|
257
|
+
declare function encryptHybrid(plaintext: string, publicKey: string): string;
|
|
258
|
+
|
|
246
259
|
/**
|
|
247
260
|
* 请求上传凭证
|
|
248
261
|
* @param data 签名请求参数
|
|
@@ -338,4 +351,4 @@ declare function setupHttp(options?: Partial<HttpOptions>): typeof http;
|
|
|
338
351
|
*/
|
|
339
352
|
declare function getHttpOptions(): HttpOptions;
|
|
340
353
|
|
|
341
|
-
export { type AliossUploadSign, type ApiRes, type ApiResData, type AxiosResponse, type DeviceInfo, type HttpConfig, HttpError, type HttpMethod, type HttpOptions, type HttpResponse, type InterceptorHandler, type LocalUploadSign, type QiniuUploadSign, type RequestConfig, type SignOptions, type UploadFileParams, type UploadSign, type UploadSignBase, calculateSign, client, request as default, del, doUpload, encryptRsa, get, getClient, getDevice, getHttpOptions, http, post, postUploadSign, put, request, setupHttp, sha256, sortString, uploadFile };
|
|
354
|
+
export { type AliossUploadSign, type ApiRes, type ApiResData, type AxiosResponse, type DeviceInfo, type HttpConfig, HttpError, type HttpMethod, type HttpOptions, type HttpResponse, type InterceptorHandler, type LocalUploadSign, type QiniuUploadSign, type RequestConfig, type SignOptions, type UploadFileParams, type UploadSign, type UploadSignBase, calculateSign, client, request as default, del, doUpload, encryptHybrid, encryptRsa, get, getClient, getDevice, getHttpOptions, http, post, postUploadSign, put, request, setupHttp, sha256, sortString, uploadFile };
|