@ka-libs/crypto 1.0.1 → 1.2.0

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("fs"),r=require("path");function t(e){const r=e instanceof Uint8Array?e:new Uint8Array(e);if(void 0!==globalThis.Buffer)return globalThis.Buffer.from(r).toString("base64");let t="";for(let e=0;e<r.length;e+=32768)t+=String.fromCharCode(...r.subarray(e,e+32768));return btoa(t)}function n(){if("undefined"!=typeof window&&window.crypto)return window.crypto;if("undefined"!=typeof self&&self.crypto)return self.crypto;if("undefined"!=typeof globalThis&&globalThis.crypto)return globalThis.crypto;if("undefined"!=typeof window&&window.msCrypto)return window.msCrypto;if("undefined"!=typeof global&&global.crypto)return global.crypto;if("function"==typeof require)return require("crypto").webcrypto;throw new Error("WebCrypto not available")}function o(){const e=n().subtle;if(!e)throw new Error("SubtleCrypto not available");return e}async function a(){const e=await o().generateKey({name:"RSA-OAEP",modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:"SHA-1"},!0,["encrypt","decrypt"]);return["-----BEGIN PUBLIC KEY-----\n"+t(await o().exportKey("spki",e.publicKey))+"\n-----END PUBLIC KEY-----","-----BEGIN PRIVATE KEY-----\n"+t(await o().exportKey("pkcs8",e.privateKey))+"\n-----END PRIVATE KEY-----"]}function i(e){return n().getRandomValues(e)}function c(e=16){return i(new Uint8Array(e))}function s(e){return e.replace(/-----BEGIN [^-]+-----/g,"").replace(/-----END [^-]+-----/g,"").replace(/\s+/g,"")}function u(e){const r=s(e);if(void 0!==globalThis.Buffer){const e=globalThis.Buffer.from(r,"base64");return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}const t=atob(r),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n.buffer}async function y(t){if("undefined"!=typeof process&&process.versions?.node){const[n,o]=await a();return e.writeFileSync(r.join(t,"public.pem"),n,"utf-8"),void e.writeFileSync(r.join(t,"private.pem"),o,"utf-8")}throw new Error("require Node runtime environment")}const p=Array.from({length:256},(e,r)=>r.toString(16).padStart(2,"0"));function f(e){const r=e;return p[r[0]]+p[r[1]]+p[r[2]]+p[r[3]]+"-"+p[r[4]]+p[r[5]]+"-"+p[r[6]]+p[r[7]]+"-"+p[r[8]]+p[r[9]]+"-"+p[r[10]]+p[r[11]]+p[r[12]]+p[r[13]]+p[r[14]]+p[r[15]]}function l(e=!1){const r=i(new Uint8Array(16));r[6]=15&r[6]|64,r[8]=63&r[8]|128;const t=f(r);return e?t.replace(/-/g,""):t}const d="6ba7b811-9dad-11d1-80b4-00c04fd430c8";async function w(e,r=d){const t=Uint8Array.from(r.replace(/-/g,"").match(/.{2}/g).map(e=>parseInt(e,16))),n=(new TextEncoder).encode(e),a=new Uint8Array(t.length+n.length);a.set(t,0),a.set(n,t.length);const i=await o().digest("SHA-1",a),c=new Uint8Array(i).slice(0,16);return c[6]=15&c[6]|80,c[8]=63&c[8]|128,f(c)}async function b(e,r=c(32),n=c(16)){const a=await o().importKey("raw",r,{name:"AES-GCM"},!1,["encrypt"]);return{data:t(await o().encrypt({name:"AES-GCM",iv:n},a,(new TextEncoder).encode(JSON.stringify(e)))),key:t(r),iv:t(n)}}async function g(e,r){const n=await async function(e){const r=u(e);return o().importKey("spki",r,{name:"RSA-OAEP",hash:"SHA-1"},!1,["encrypt"])}(r);return t(await o().encrypt({name:"RSA-OAEP"},n,(new TextEncoder).encode(JSON.stringify(e))))}async function A(e,r){if(!r)return null;const t=await b(e);return{valid:await g({key:t.key,iv:t.iv},r),data:t.data}}async function m(e,r,t){try{const n=await o().importKey("raw",u(r),{name:"AES-GCM"},!1,["decrypt"]),a=await o().decrypt({name:"AES-GCM",iv:u(t)},n,u(e));return JSON.parse((new TextDecoder).decode(a))}catch(e){return console.error(e),null}}async function E(e,r){const t=await async function(e){const r=u(e);return o().importKey("pkcs8",r,{name:"RSA-OAEP",hash:"SHA-1"},!1,["decrypt"])}(r),n=await o().decrypt({name:"RSA-OAEP"},t,u(e));return JSON.parse((new TextDecoder).decode(n))}async function h(e,r,t){try{const n=await E(r,t);return m(e,n.key,n.iv)}catch(e){return console.error(e),null}}var x=Object.freeze({__proto__:null,aesDecrypt:m,aesEncrypt:b,arrayBufferToBase64:t,base64Cleaner:s,base64ToArrayBuffer:u,decrypt:h,encrypt:A,exportKeyPairs:y,getRandomBytes:c,getRandomValues:i,keyPairs:a,rsaDecrypt:E,rsaEncrypt:g,uuidv4:l,uuidv5:w});exports.aesDecrypt=m,exports.aesEncrypt=b,exports.arrayBufferToBase64=t,exports.base64Cleaner=s,exports.base64ToArrayBuffer=u,exports.decrypt=h,exports.default=x,exports.encrypt=A,exports.exportKeyPairs=y,exports.getRandomBytes=c,exports.getRandomValues=i,exports.keyPairs=a,exports.rsaDecrypt=E,exports.rsaEncrypt=g,exports.uuidv4=l,exports.uuidv5=w;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("fs"),t=require("path");function r(e){const t=e instanceof Uint8Array?e:new Uint8Array(e);if(void 0!==globalThis.Buffer)return globalThis.Buffer.from(t).toString("base64");let r="";for(let e=0;e<t.length;e+=32768)r+=String.fromCharCode(...t.subarray(e,e+32768));return btoa(r)}function n(){if("undefined"!=typeof window&&window.crypto)return window.crypto;if("undefined"!=typeof self&&self.crypto)return self.crypto;if("undefined"!=typeof globalThis&&globalThis.crypto)return globalThis.crypto;if("undefined"!=typeof window&&window.msCrypto)return window.msCrypto;if("undefined"!=typeof global&&global.crypto)return global.crypto;if("function"==typeof require)return require("crypto").webcrypto;throw new Error("WebCrypto not available")}function o(){const e=n().subtle;if(!e)throw new Error("SubtleCrypto not available");return e}async function a(){const e=await o().generateKey({name:"RSA-OAEP",modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:"SHA-1"},!0,["encrypt","decrypt"]);return["-----BEGIN PUBLIC KEY-----\n"+r(await o().exportKey("spki",e.publicKey))+"\n-----END PUBLIC KEY-----","-----BEGIN PRIVATE KEY-----\n"+r(await o().exportKey("pkcs8",e.privateKey))+"\n-----END PRIVATE KEY-----"]}function i(e){return n().getRandomValues(e)}function s(e=16){return i(new Uint8Array(e))}function c(e){return e.replace(/-----BEGIN [^-]+-----/g,"").replace(/-----END [^-]+-----/g,"").replace(/\s+/g,"")}function u(e){const t=c(e);if(void 0!==globalThis.Buffer){const e=globalThis.Buffer.from(t,"base64");return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}const r=atob(t),n=new Uint8Array(r.length);for(let e=0;e<r.length;e++)n[e]=r.charCodeAt(e);return n.buffer}async function y(r){if("undefined"!=typeof process&&process.versions?.node){const[n,o]=await a();return e.writeFileSync(t.join(r,"public.pem"),n,"utf-8"),void e.writeFileSync(t.join(r,"private.pem"),o,"utf-8")}throw new Error("require Node runtime environment")}const p=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function f(e){const t=e;return p[t[0]]+p[t[1]]+p[t[2]]+p[t[3]]+"-"+p[t[4]]+p[t[5]]+"-"+p[t[6]]+p[t[7]]+"-"+p[t[8]]+p[t[9]]+"-"+p[t[10]]+p[t[11]]+p[t[12]]+p[t[13]]+p[t[14]]+p[t[15]]}function l(e=!1){const t=i(new Uint8Array(16));t[6]=15&t[6]|64,t[8]=63&t[8]|128;const r=f(t);return e?r.replace(/-/g,""):r}const d="6ba7b811-9dad-11d1-80b4-00c04fd430c8";async function w(e,t=d){const r=Uint8Array.from(t.replace(/-/g,"").match(/.{2}/g).map(e=>parseInt(e,16))),n=(new TextEncoder).encode(e),a=new Uint8Array(r.length+n.length);a.set(r,0),a.set(n,r.length);const i=await o().digest("SHA-1",a),s=new Uint8Array(i).slice(0,16);return s[6]=15&s[6]|80,s[8]=63&s[8]|128,f(s)}async function g(e,t=s(32),n=s(12)){const a=await o().importKey("raw",t,{name:"AES-GCM"},!1,["encrypt"]),i=await o().encrypt({name:"AES-GCM",iv:n,tagLength:128},a,(new TextEncoder).encode(JSON.stringify(e))),c=new Uint8Array(i),u=i.slice(c.length-16),y=new Uint8Array(t.length+n.length+16);return y.set(t,0),y.set(n,t.length),y.set(new Uint8Array(u),t.length+n.length),{data:r(i.slice(0,c.length-16)),payload:r(y)}}async function h(e,t){const n=await async function(e){const t=u(e);return o().importKey("spki",t,{name:"RSA-OAEP",hash:"SHA-1"},!1,["encrypt"])}(t);return r(await o().encrypt({name:"RSA-OAEP"},n,(new TextEncoder).encode(JSON.stringify(e))))}async function b(e,t){if(!t)return null;const r=await g(e);return{valid:await h(r.payload,t),data:r.data}}async function A(e,t){try{const r=u(t),n=r.slice(0,32),a=r.slice(32,44),i=r.slice(-16),s=await o().importKey("raw",n,{name:"AES-GCM"},!1,["decrypt"]),c=new Uint8Array(u(e)),y=new Uint8Array(c.length+16);y.set(c,0),y.set(new Uint8Array(i),c.length);const p=await o().decrypt({name:"AES-GCM",iv:a,tagLength:128},s,y.buffer);return JSON.parse((new TextDecoder).decode(p))}catch(e){return console.error(e),null}}async function m(e,t){const r=await async function(e){const t=u(e);return o().importKey("pkcs8",t,{name:"RSA-OAEP",hash:"SHA-1"},!1,["decrypt"])}(t),n=await o().decrypt({name:"RSA-OAEP"},r,u(e));return JSON.parse((new TextDecoder).decode(n))}async function E(e,t,r){try{return A(e,await m(t,r))}catch(e){return console.error(e),null}}var x=Object.freeze({__proto__:null,aesDecrypt:A,aesEncrypt:g,arrayBufferToBase64:r,base64Cleaner:c,base64ToArrayBuffer:u,decrypt:E,encrypt:b,exportKeyPairs:y,getRandomBytes:s,getRandomValues:i,keyPairs:a,rsaDecrypt:m,rsaEncrypt:h,uuidv4:l,uuidv5:w});exports.aesDecrypt=A,exports.aesEncrypt=g,exports.arrayBufferToBase64=r,exports.base64Cleaner=c,exports.base64ToArrayBuffer=u,exports.decrypt=E,exports.default=x,exports.encrypt=b,exports.exportKeyPairs=y,exports.getRandomBytes=s,exports.getRandomValues=i,exports.keyPairs=a,exports.rsaDecrypt=m,exports.rsaEncrypt=h,exports.uuidv4=l,exports.uuidv5=w;
@@ -1 +1 @@
1
- import{base64ToArrayBuffer as r}from"../lib/base64ToArrayBuffer.js";import{getSubtle as e}from"../core/getSubtle.js";async function t(t,o,a){try{const c=await e().importKey("raw",r(o),{name:"AES-GCM"},!1,["decrypt"]),n=await e().decrypt({name:"AES-GCM",iv:r(a)},c,r(t));return JSON.parse((new TextDecoder).decode(n))}catch(r){return console.error(r),null}}export{t as aesDecrypt};
1
+ import{base64ToArrayBuffer as e}from"../lib/base64ToArrayBuffer.js";import{getSubtle as r}from"../core/getSubtle.js";async function t(t,n){try{const a=e(n),o=a.slice(0,32),c=a.slice(32,44),i=a.slice(-16),s=await r().importKey("raw",o,{name:"AES-GCM"},!1,["decrypt"]),l=new Uint8Array(e(t)),y=new Uint8Array(l.length+16);y.set(l,0),y.set(new Uint8Array(i),l.length);const f=await r().decrypt({name:"AES-GCM",iv:c,tagLength:128},s,y.buffer);return JSON.parse((new TextDecoder).decode(f))}catch(e){return console.error(e),null}}export{t as aesDecrypt};
@@ -1 +1 @@
1
- import{arrayBufferToBase64 as e}from"../lib/arrayBufferToBase64.js";import{getSubtle as r}from"../core/getSubtle.js";import{getRandomBytes as t}from"../lib/getRandomBytes.js";async function o(o,a=t(32),n=t(16)){const i=await r().importKey("raw",a,{name:"AES-GCM"},!1,["encrypt"]),m=await r().encrypt({name:"AES-GCM",iv:n},i,(new TextEncoder).encode(JSON.stringify(o)));return{data:e(m),key:e(a),iv:e(n)}}export{o as aesEncrypt};
1
+ import{arrayBufferToBase64 as e}from"../lib/arrayBufferToBase64.js";import{getSubtle as t}from"../core/getSubtle.js";import{getRandomBytes as n}from"../lib/getRandomBytes.js";async function r(r,a=n(32),i=n(12)){const o=await t().importKey("raw",a,{name:"AES-GCM"},!1,["encrypt"]),l=await t().encrypt({name:"AES-GCM",iv:i,tagLength:128},o,(new TextEncoder).encode(JSON.stringify(r))),s=new Uint8Array(l),g=l.slice(s.length-16),y=new Uint8Array(a.length+i.length+16);return y.set(a,0),y.set(i,a.length),y.set(new Uint8Array(g),a.length+i.length),{data:e(l.slice(0,s.length-16)),payload:e(y)}}export{r as aesEncrypt};
@@ -1 +1 @@
1
- import{aesDecrypt as r}from"./aesDecrypt.js";import{rsaDecrypt as t}from"./rsaDecrypt.js";async function o(o,e,c){try{const n=await t(e,c);return r(o,n.key,n.iv)}catch(r){return console.error(r),null}}export{o as decrypt};
1
+ import{aesDecrypt as r}from"./aesDecrypt.js";import{rsaDecrypt as t}from"./rsaDecrypt.js";async function o(o,c,e){try{const n=await t(c,e);return r(o,n)}catch(r){return console.error(r),null}}export{o as decrypt};
@@ -1 +1 @@
1
- import{aesEncrypt as t}from"./aesEncrypt.js";import{rsaEncrypt as a}from"./rsaEncrypt.js";async function r(r,i){if(!i)return null;const n=await t(r);return{valid:await a({key:n.key,iv:n.iv},i),data:n.data}}export{r as encrypt};
1
+ import{aesEncrypt as a}from"./aesEncrypt.js";import{rsaEncrypt as t}from"./rsaEncrypt.js";async function r(r,n){if(!n)return null;const o=await a(r);return{valid:await t(o.payload,n),data:o.data}}export{r as encrypt};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * AES解密
3
+ */
4
+ declare function aesDecrypt(data: string, payload: string): Promise<any>;
5
+
6
+ export { aesDecrypt, aesDecrypt as default };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * AES加密
3
+ */
4
+ declare function aesEncrypt<T>(data: T, aesKey?: Uint8Array<ArrayBuffer>, aesIv?: Uint8Array<ArrayBuffer>): Promise<{
5
+ data: string;
6
+ payload: string;
7
+ }>;
8
+
9
+ export { aesEncrypt, aesEncrypt as default };
@@ -0,0 +1,3 @@
1
+ declare function arrayBufferToBase64(input: ArrayBuffer | Uint8Array): string;
2
+
3
+ export { arrayBufferToBase64, arrayBufferToBase64 as default };
@@ -0,0 +1,3 @@
1
+ declare function base64Cleaner(input: string): string;
2
+
3
+ export { base64Cleaner, base64Cleaner as default };
@@ -0,0 +1,3 @@
1
+ declare function base64ToArrayBuffer(input: Base64URLString): ArrayBuffer;
2
+
3
+ export { base64ToArrayBuffer, base64ToArrayBuffer as default };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * 混合解密
3
+ */
4
+ declare function decrypt(data: string, valid: string, privateKey: string): Promise<any>;
5
+
6
+ export { decrypt, decrypt as default };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 混合加密
3
+ */
4
+ declare function encrypt<T>(data: T, publicKey: string): Promise<{
5
+ valid: string;
6
+ data: string;
7
+ } | null>;
8
+
9
+ export { encrypt as default, encrypt };
@@ -0,0 +1,3 @@
1
+ declare function exportKeyPairs(dist: string): Promise<void>;
2
+
3
+ export { exportKeyPairs as default, exportKeyPairs };
@@ -0,0 +1,3 @@
1
+ declare function getRandomBytes(length?: number): Uint8Array<ArrayBuffer>;
2
+
3
+ export { getRandomBytes as default, getRandomBytes };
@@ -0,0 +1,3 @@
1
+ declare function getRandomValues<T extends Exclude<BufferSource, ArrayBuffer>>(abv: T): T;
2
+
3
+ export { getRandomValues as default, getRandomValues };
@@ -47,14 +47,13 @@ declare function rsaDecrypt(data: string, privateKey: string): Promise<any>;
47
47
  */
48
48
  declare function aesEncrypt<T>(data: T, aesKey?: Uint8Array<ArrayBuffer>, aesIv?: Uint8Array<ArrayBuffer>): Promise<{
49
49
  data: string;
50
- key: string;
51
- iv: string;
50
+ payload: string;
52
51
  }>;
53
52
 
54
53
  /**
55
54
  * AES解密
56
55
  */
57
- declare function aesDecrypt(data: string, aesKey: string, aesIv: string): Promise<any>;
56
+ declare function aesDecrypt(data: string, payload: string): Promise<any>;
58
57
 
59
58
  declare const KaCrypto_aesDecrypt: typeof aesDecrypt;
60
59
  declare const KaCrypto_aesEncrypt: typeof aesEncrypt;
@@ -0,0 +1,3 @@
1
+ declare function keyPairs(): Promise<string[]>;
2
+
3
+ export { keyPairs as default, keyPairs };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * RSA解密
3
+ */
4
+ declare function rsaDecrypt(data: string, privateKey: string): Promise<any>;
5
+
6
+ export { rsaDecrypt as default, rsaDecrypt };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * RSA加密
3
+ */
4
+ declare function rsaEncrypt<T>(data: T, publicKey: string): Promise<string>;
5
+
6
+ export { rsaEncrypt as default, rsaEncrypt };
@@ -0,0 +1,3 @@
1
+ declare function uuidv4(simplify?: boolean): string;
2
+
3
+ export { uuidv4 as default, uuidv4 };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * UUID v5 generator
3
+ */
4
+ declare function uuidv5(name: string, namespace?: string): Promise<string>;
5
+
6
+ export { uuidv5 as default, uuidv5 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ka-libs/crypto",
3
- "version": "1.0.1",
3
+ "version": "1.2.0",
4
4
  "description": "Cross-environment crypto utility for Node.js & Browser, implement RSA-AES hybrid encryption based on native Web Crypto / Node.js crypto without third-party dependencies.",
5
5
  "scripts": {
6
6
  "build:js": "rollup -c",
@@ -11,58 +11,73 @@
11
11
  "main": "./dist/cjs/index.cjs",
12
12
  "module": "./dist/esm/index.js",
13
13
  "browser": "dist/index.esm.js",
14
- "types": "./dist/index.d.ts",
14
+ "types": "./dist/types/index.d.ts",
15
15
  "type": "module",
16
16
  "exports": {
17
17
  ".": {
18
- "types": "./dist/index.d.ts",
18
+ "types": "./dist/types/index.d.ts",
19
19
  "import": "./dist/esm/index.js",
20
20
  "require": "./dist/cjs/index.cjs"
21
21
  },
22
22
  "./aes-decrypt": {
23
- "import": "./dist/esm/exports/aes-decrypt.js"
23
+ "import": "./dist/esm/exports/aes-decrypt.js",
24
+ "types": "./dist/types/aes-decrypt.d.ts"
24
25
  },
25
26
  "./aes-encrypt": {
26
- "import": "./dist/esm/exports/aes-encrypt.js"
27
+ "import": "./dist/esm/exports/aes-encrypt.js",
28
+ "types": "./dist/types/aes-encrypt.d.ts"
27
29
  },
28
30
  "./array-buffer-to-base64": {
29
- "import": "./dist/esm/exports/array-buffer-to-base64.js"
31
+ "import": "./dist/esm/exports/array-buffer-to-base64.js",
32
+ "types": "./dist/types/array-buffer-to-base64.d.ts"
30
33
  },
31
34
  "./base64-cleaner": {
32
- "import": "./dist/esm/exports/base64-cleaner.js"
35
+ "import": "./dist/esm/exports/base64-cleaner.js",
36
+ "types": "./dist/types/base64-cleaner.d.ts"
33
37
  },
34
38
  "./base64-to-array-buffer": {
35
- "import": "./dist/esm/exports/base64-to-array-buffer.js"
39
+ "import": "./dist/esm/exports/base64-to-array-buffer.js",
40
+ "types": "./dist/types/base64-to-array-buffer.d.ts"
36
41
  },
37
42
  "./decrypt": {
38
- "import": "./dist/esm/exports/decrypt.js"
43
+ "import": "./dist/esm/exports/decrypt.js",
44
+ "types": "./dist/types/decrypt.d.ts"
39
45
  },
40
46
  "./encrypt": {
41
- "import": "./dist/esm/exports/encrypt.js"
47
+ "import": "./dist/esm/exports/encrypt.js",
48
+ "types": "./dist/types/encrypt.d.ts"
42
49
  },
43
50
  "./export-key-pairs": {
44
- "import": "./dist/esm/exports/export-key-pairs.js"
51
+ "import": "./dist/esm/exports/export-key-pairs.js",
52
+ "types": "./dist/types/export-key-pairs.d.ts"
45
53
  },
46
54
  "./get-random-bytes": {
47
- "import": "./dist/esm/exports/get-random-bytes.js"
55
+ "import": "./dist/esm/exports/get-random-bytes.js",
56
+ "types": "./dist/types/get-random-bytes.d.ts"
48
57
  },
49
58
  "./get-random-values": {
50
- "import": "./dist/esm/exports/get-random-values.js"
59
+ "import": "./dist/esm/exports/get-random-values.js",
60
+ "types": "./dist/types/get-random-values.d.ts"
51
61
  },
52
62
  "./key-pairs": {
53
- "import": "./dist/esm/exports/key-pairs.js"
63
+ "import": "./dist/esm/exports/key-pairs.js",
64
+ "types": "./dist/types/key-pairs.d.ts"
54
65
  },
55
66
  "./rsa-decrypt": {
56
- "import": "./dist/esm/exports/rsa-decrypt.js"
67
+ "import": "./dist/esm/exports/rsa-decrypt.js",
68
+ "types": "./dist/types/rsa-decrypt.d.ts"
57
69
  },
58
70
  "./rsa-encrypt": {
59
- "import": "./dist/esm/exports/rsa-encrypt.js"
71
+ "import": "./dist/esm/exports/rsa-encrypt.js",
72
+ "types": "./dist/types/rsa-encrypt.d.ts"
60
73
  },
61
74
  "./uuidv4": {
62
- "import": "./dist/esm/exports/uuidv4.js"
75
+ "import": "./dist/esm/exports/uuidv4.js",
76
+ "types": "./dist/types/uuidv4.d.ts"
63
77
  },
64
78
  "./uuidv5": {
65
- "import": "./dist/esm/exports/uuidv5.js"
79
+ "import": "./dist/esm/exports/uuidv5.js",
80
+ "types": "./dist/types/uuidv5.d.ts"
66
81
  }
67
82
  },
68
83
  "files": [