@ddunigma/node 6.0.1 → 6.1.2
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 +64 -2
- package/CONTRIBUTING.md +137 -0
- package/README.md +54 -39
- package/ROADMAP.md +12 -11
- package/dist/BrowserAdapter-FJYE5LZO.js +1 -0
- package/dist/BrowserAdapter-NXLXZCJX.cjs +1 -0
- package/dist/{ObfuscationLayer-DTlA723P.d.ts → ObfuscationLayer-C5TQHpYX.d.cts} +9 -11
- package/dist/{ObfuscationLayer-4rCOCRWH.d.cts → ObfuscationLayer-DmlvbjTB.d.ts} +9 -11
- package/dist/{WebStreams-C16QV2Dz.d.ts → WebStreams-DY1ovJBp.d.cts} +5 -9
- package/dist/{WebStreams-CY9E19f5.d.cts → WebStreams-DynLi09H.d.ts} +5 -9
- package/dist/browser.cjs +1 -1
- package/dist/browser.d.cts +12 -21
- package/dist/browser.d.ts +12 -21
- package/dist/browser.js +1 -1
- package/dist/chunk-B4QRMN45.js +9 -0
- package/dist/chunk-BUR4IORD.cjs +1 -0
- package/dist/chunk-C2AT5XRJ.js +1 -0
- package/dist/chunk-DAHLP6QA.cjs +1 -0
- package/dist/chunk-GR2WPLDK.js +1 -0
- package/dist/chunk-JATMOMX5.cjs +9 -0
- package/dist/chunk-XVV2OPRV.js +1 -0
- package/dist/chunk-ZMNWFYGY.cjs +1 -0
- package/dist/{core-BsIwjJK-.d.cts → core-DCeItMgU.d.cts} +35 -53
- package/dist/{core-BsIwjJK-.d.ts → core-DCeItMgU.d.ts} +35 -53
- package/dist/core.cjs +1 -1
- package/dist/core.d.cts +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +21 -26
- package/dist/index.d.ts +21 -26
- package/dist/index.js +1 -1
- package/dist/secure.browser.cjs +1 -1
- package/dist/secure.browser.d.cts +4 -4
- package/dist/secure.browser.d.ts +4 -4
- package/dist/secure.browser.js +1 -1
- package/dist/secure.cjs +1 -1
- package/dist/secure.d.cts +9 -9
- package/dist/secure.d.ts +9 -9
- package/dist/secure.js +1 -1
- package/docs/REFERENCE.md +45 -32
- package/package.json +22 -16
- package/dist/BrowserAdapter-A6RBN4N3.js +0 -1
- package/dist/BrowserAdapter-NWASGV3D.cjs +0 -1
- package/dist/chunk-6N7QYPEJ.js +0 -1
- package/dist/chunk-6ZYMNHFT.js +0 -1
- package/dist/chunk-7KUEHTG2.js +0 -1
- package/dist/chunk-BDP7E7K3.cjs +0 -1
- package/dist/chunk-HUUB5BUS.cjs +0 -1
- package/dist/chunk-JBUTKSCC.cjs +0 -9
- package/dist/chunk-LCOYWJWO.cjs +0 -1
- package/dist/chunk-VW2SZR2Z.js +0 -9
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { D as Ddu64Core, a as
|
|
2
|
-
export { C as CharSetConfig, d as CharSetInfo, e as CharsetBuilder, f as Ddu64AdapterError, g as Ddu64CharsetError, h as Ddu64ChecksumError, i as Ddu64CompressionError, j as Ddu64DecodeError, k as Ddu64DecompressionError, l as Ddu64DecryptionError, m as Ddu64EncodeError, n as Ddu64EncryptionError, o as Ddu64Error, p as Ddu64ErrorCode, q as Ddu64ErrorOptions, r as Ddu64InvalidInputError, s as Ddu64LimitError, t as Ddu64ObfuscationError, u as Ddu64Operation, v as Ddu64StreamError, w as
|
|
3
|
-
export { H as HangulObfuscationLayer, c as createEncoderObfuscationLayer, d as detectRuntime } from './ObfuscationLayer-
|
|
1
|
+
import { D as Ddu64Core, a as DduSecureConstructorOptions, b as DduOptions, c as DduEncodeStats } from './core-DCeItMgU.cjs';
|
|
2
|
+
export { C as CharSetConfig, d as CharSetInfo, e as CharsetBuilder, f as Ddu64AdapterError, g as Ddu64CharsetError, h as Ddu64ChecksumError, i as Ddu64CompressionError, j as Ddu64DecodeError, k as Ddu64DecompressionError, l as Ddu64DecryptionError, m as Ddu64EncodeError, n as Ddu64EncryptionError, o as Ddu64Error, p as Ddu64ErrorCode, q as Ddu64ErrorOptions, r as Ddu64InvalidInputError, s as Ddu64LimitError, t as Ddu64ObfuscationError, u as Ddu64Operation, v as Ddu64StreamError, w as DduBaseConstructorOptions, x as DduBaseOptions, y as DduConstructorOptions, z as DduProgressInfo, A as DduSecureOptions, B as DduSetSymbol, E as DduSetSymbolInput, F as EncodingProfile, K as KeyDerivationAlgorithm, G as KeyDerivationOptions, O as ObfuscationLayer, P as PlatformAdapter, H as isDdu64Error } from './core-DCeItMgU.cjs';
|
|
3
|
+
export { H as HangulObfuscationLayer, c as createEncoderObfuscationLayer, d as detectRuntime } from './ObfuscationLayer-C5TQHpYX.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* Node.js 전용 기본
|
|
6
|
+
* Node.js 전용 기본 Ddu64 래퍼.
|
|
7
7
|
*
|
|
8
8
|
* Ddu64Core를 확장하여 인코딩 + 한글 난독화(라이브러리 주목적: 재미 + 시각적 난독화)와
|
|
9
9
|
* Node.js Buffer 디코드를 제공합니다:
|
|
@@ -11,15 +11,15 @@ export { H as HangulObfuscationLayer, c as createEncoderObfuscationLayer, d as d
|
|
|
11
11
|
* - Node.js Buffer를 반환하는 `decodeToBuffer` 및 `decodeToBufferAsync` 제공
|
|
12
12
|
* - encode()에 Buffer 입력 허용 (Buffer는 Uint8Array를 확장)
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
14
|
+
* 기본 경로는 어댑터(zlib/crypto)를 정적 import하지 않습니다. 비동기 압축/암복호화가
|
|
15
|
+
* 실제로 실행될 때 NodeAdapter만 동적 import해 현재 core 인스턴스에 주입합니다.
|
|
16
|
+
* 동기 secure 작업이 필요하면 `@ddunigma/node/secure`를 사용하세요.
|
|
17
17
|
*
|
|
18
18
|
* @module Ddu64Node
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
* Node.js 전용 기본 Ddu64
|
|
22
|
+
* Node.js 전용 기본 Ddu64 인코더/디코더.
|
|
23
23
|
*
|
|
24
24
|
* Ddu64Core를 래핑하여 한글 난독화 레이어를 자동 주입하고,
|
|
25
25
|
* 하위 호환성을 위한 Buffer 반환 디코드 메서드를 제공합니다.
|
|
@@ -34,23 +34,18 @@ export { H as HangulObfuscationLayer, c as createEncoderObfuscationLayer, d as d
|
|
|
34
34
|
* ```
|
|
35
35
|
*/
|
|
36
36
|
declare class Ddu64Node extends Ddu64Core {
|
|
37
|
-
|
|
37
|
+
#private;
|
|
38
|
+
constructor(dduChar?: string[] | string | DduSecureConstructorOptions, paddingChar?: string, dduOptions?: DduSecureConstructorOptions);
|
|
38
39
|
/** @group Sync */
|
|
39
|
-
encode(input: Uint8Array | string, options?:
|
|
40
|
-
/**
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
/** @group Sync */
|
|
47
|
-
decodeToUint8Array(input: string, options?: DduBaseOptions): Uint8Array;
|
|
48
|
-
/** @group Async */
|
|
49
|
-
decodeToUint8ArrayAsync(input: string, options?: DduBaseOptions): Promise<Uint8Array>;
|
|
50
|
-
/** @group Introspection */
|
|
51
|
-
getStats(input: Uint8Array | string, options?: DduBaseOptions): DduEncodeStats;
|
|
40
|
+
encode(input: Uint8Array | string, options?: DduOptions): string;
|
|
41
|
+
/**
|
|
42
|
+
* @group Sync
|
|
43
|
+
* `decode`/`decodeToBuffer`는 코어에서 `this.decodeToUint8Array`를 경유하므로 이 가드 하나가
|
|
44
|
+
* sync 디코드 3종을 모두 덮습니다(중복 override 불필요).
|
|
45
|
+
*/
|
|
46
|
+
decodeToUint8Array(input: string, options?: DduOptions): Uint8Array;
|
|
52
47
|
/** @group Introspection */
|
|
53
|
-
|
|
48
|
+
getStats(input: Uint8Array | string, options?: DduOptions): DduEncodeStats;
|
|
54
49
|
/**
|
|
55
50
|
* 인코딩된 문자열을 Node.js Buffer로 디코딩합니다.
|
|
56
51
|
*
|
|
@@ -59,7 +54,7 @@ declare class Ddu64Node extends Ddu64Core {
|
|
|
59
54
|
* @returns 디코딩된 Buffer
|
|
60
55
|
* @group Sync
|
|
61
56
|
*/
|
|
62
|
-
decodeToBuffer(input: string, options?:
|
|
57
|
+
decodeToBuffer(input: string, options?: DduOptions): Buffer;
|
|
63
58
|
/**
|
|
64
59
|
* 비동기적으로 Node.js Buffer로 디코딩합니다.
|
|
65
60
|
*
|
|
@@ -68,7 +63,7 @@ declare class Ddu64Node extends Ddu64Core {
|
|
|
68
63
|
* @returns 디코딩된 Buffer로 resolve되는 Promise
|
|
69
64
|
* @group Async
|
|
70
65
|
*/
|
|
71
|
-
decodeToBufferAsync(input: string, options?:
|
|
66
|
+
decodeToBufferAsync(input: string, options?: DduOptions): Promise<Buffer>;
|
|
72
67
|
}
|
|
73
68
|
|
|
74
|
-
export { Ddu64Node as Ddu64, Ddu64Core, Ddu64Node,
|
|
69
|
+
export { Ddu64Node as Ddu64, Ddu64Core, Ddu64Node, DduEncodeStats, DduOptions, DduSecureConstructorOptions };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { D as Ddu64Core, a as
|
|
2
|
-
export { C as CharSetConfig, d as CharSetInfo, e as CharsetBuilder, f as Ddu64AdapterError, g as Ddu64CharsetError, h as Ddu64ChecksumError, i as Ddu64CompressionError, j as Ddu64DecodeError, k as Ddu64DecompressionError, l as Ddu64DecryptionError, m as Ddu64EncodeError, n as Ddu64EncryptionError, o as Ddu64Error, p as Ddu64ErrorCode, q as Ddu64ErrorOptions, r as Ddu64InvalidInputError, s as Ddu64LimitError, t as Ddu64ObfuscationError, u as Ddu64Operation, v as Ddu64StreamError, w as
|
|
3
|
-
export { H as HangulObfuscationLayer, c as createEncoderObfuscationLayer, d as detectRuntime } from './ObfuscationLayer-
|
|
1
|
+
import { D as Ddu64Core, a as DduSecureConstructorOptions, b as DduOptions, c as DduEncodeStats } from './core-DCeItMgU.js';
|
|
2
|
+
export { C as CharSetConfig, d as CharSetInfo, e as CharsetBuilder, f as Ddu64AdapterError, g as Ddu64CharsetError, h as Ddu64ChecksumError, i as Ddu64CompressionError, j as Ddu64DecodeError, k as Ddu64DecompressionError, l as Ddu64DecryptionError, m as Ddu64EncodeError, n as Ddu64EncryptionError, o as Ddu64Error, p as Ddu64ErrorCode, q as Ddu64ErrorOptions, r as Ddu64InvalidInputError, s as Ddu64LimitError, t as Ddu64ObfuscationError, u as Ddu64Operation, v as Ddu64StreamError, w as DduBaseConstructorOptions, x as DduBaseOptions, y as DduConstructorOptions, z as DduProgressInfo, A as DduSecureOptions, B as DduSetSymbol, E as DduSetSymbolInput, F as EncodingProfile, K as KeyDerivationAlgorithm, G as KeyDerivationOptions, O as ObfuscationLayer, P as PlatformAdapter, H as isDdu64Error } from './core-DCeItMgU.js';
|
|
3
|
+
export { H as HangulObfuscationLayer, c as createEncoderObfuscationLayer, d as detectRuntime } from './ObfuscationLayer-DmlvbjTB.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* Node.js 전용 기본
|
|
6
|
+
* Node.js 전용 기본 Ddu64 래퍼.
|
|
7
7
|
*
|
|
8
8
|
* Ddu64Core를 확장하여 인코딩 + 한글 난독화(라이브러리 주목적: 재미 + 시각적 난독화)와
|
|
9
9
|
* Node.js Buffer 디코드를 제공합니다:
|
|
@@ -11,15 +11,15 @@ export { H as HangulObfuscationLayer, c as createEncoderObfuscationLayer, d as d
|
|
|
11
11
|
* - Node.js Buffer를 반환하는 `decodeToBuffer` 및 `decodeToBufferAsync` 제공
|
|
12
12
|
* - encode()에 Buffer 입력 허용 (Buffer는 Uint8Array를 확장)
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
14
|
+
* 기본 경로는 어댑터(zlib/crypto)를 정적 import하지 않습니다. 비동기 압축/암복호화가
|
|
15
|
+
* 실제로 실행될 때 NodeAdapter만 동적 import해 현재 core 인스턴스에 주입합니다.
|
|
16
|
+
* 동기 secure 작업이 필요하면 `@ddunigma/node/secure`를 사용하세요.
|
|
17
17
|
*
|
|
18
18
|
* @module Ddu64Node
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
* Node.js 전용 기본 Ddu64
|
|
22
|
+
* Node.js 전용 기본 Ddu64 인코더/디코더.
|
|
23
23
|
*
|
|
24
24
|
* Ddu64Core를 래핑하여 한글 난독화 레이어를 자동 주입하고,
|
|
25
25
|
* 하위 호환성을 위한 Buffer 반환 디코드 메서드를 제공합니다.
|
|
@@ -34,23 +34,18 @@ export { H as HangulObfuscationLayer, c as createEncoderObfuscationLayer, d as d
|
|
|
34
34
|
* ```
|
|
35
35
|
*/
|
|
36
36
|
declare class Ddu64Node extends Ddu64Core {
|
|
37
|
-
|
|
37
|
+
#private;
|
|
38
|
+
constructor(dduChar?: string[] | string | DduSecureConstructorOptions, paddingChar?: string, dduOptions?: DduSecureConstructorOptions);
|
|
38
39
|
/** @group Sync */
|
|
39
|
-
encode(input: Uint8Array | string, options?:
|
|
40
|
-
/**
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
/** @group Sync */
|
|
47
|
-
decodeToUint8Array(input: string, options?: DduBaseOptions): Uint8Array;
|
|
48
|
-
/** @group Async */
|
|
49
|
-
decodeToUint8ArrayAsync(input: string, options?: DduBaseOptions): Promise<Uint8Array>;
|
|
50
|
-
/** @group Introspection */
|
|
51
|
-
getStats(input: Uint8Array | string, options?: DduBaseOptions): DduEncodeStats;
|
|
40
|
+
encode(input: Uint8Array | string, options?: DduOptions): string;
|
|
41
|
+
/**
|
|
42
|
+
* @group Sync
|
|
43
|
+
* `decode`/`decodeToBuffer`는 코어에서 `this.decodeToUint8Array`를 경유하므로 이 가드 하나가
|
|
44
|
+
* sync 디코드 3종을 모두 덮습니다(중복 override 불필요).
|
|
45
|
+
*/
|
|
46
|
+
decodeToUint8Array(input: string, options?: DduOptions): Uint8Array;
|
|
52
47
|
/** @group Introspection */
|
|
53
|
-
|
|
48
|
+
getStats(input: Uint8Array | string, options?: DduOptions): DduEncodeStats;
|
|
54
49
|
/**
|
|
55
50
|
* 인코딩된 문자열을 Node.js Buffer로 디코딩합니다.
|
|
56
51
|
*
|
|
@@ -59,7 +54,7 @@ declare class Ddu64Node extends Ddu64Core {
|
|
|
59
54
|
* @returns 디코딩된 Buffer
|
|
60
55
|
* @group Sync
|
|
61
56
|
*/
|
|
62
|
-
decodeToBuffer(input: string, options?:
|
|
57
|
+
decodeToBuffer(input: string, options?: DduOptions): Buffer;
|
|
63
58
|
/**
|
|
64
59
|
* 비동기적으로 Node.js Buffer로 디코딩합니다.
|
|
65
60
|
*
|
|
@@ -68,7 +63,7 @@ declare class Ddu64Node extends Ddu64Core {
|
|
|
68
63
|
* @returns 디코딩된 Buffer로 resolve되는 Promise
|
|
69
64
|
* @group Async
|
|
70
65
|
*/
|
|
71
|
-
decodeToBufferAsync(input: string, options?:
|
|
66
|
+
decodeToBufferAsync(input: string, options?: DduOptions): Promise<Buffer>;
|
|
72
67
|
}
|
|
73
68
|
|
|
74
|
-
export { Ddu64Node as Ddu64, Ddu64Core, Ddu64Node,
|
|
69
|
+
export { Ddu64Node as Ddu64, Ddu64Core, Ddu64Node, DduEncodeStats, DduOptions, DduSecureConstructorOptions };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-XVV2OPRV.js';export{a as HangulObfuscationLayer,b as createEncoderObfuscationLayer,c as detectRuntime}from'./chunk-XVV2OPRV.js';import {i,b}from'./chunk-B4QRMN45.js';export{j as CharsetBuilder,i as Ddu64Core,a as DduSetSymbol}from'./chunk-B4QRMN45.js';import {m}from'./chunk-IZK7KCU7.js';export{m as Ddu64AdapterError,j as Ddu64CharsetError,i as Ddu64ChecksumError,e as Ddu64CompressionError,d as Ddu64DecodeError,f as Ddu64DecompressionError,h as Ddu64DecryptionError,c as Ddu64EncodeError,g as Ddu64EncryptionError,b as Ddu64Error,a as Ddu64ErrorCode,k as Ddu64InvalidInputError,l as Ddu64LimitError,n as Ddu64ObfuscationError,o as Ddu64StreamError,p as isDdu64Error}from'./chunk-IZK7KCU7.js';import {a}from'./chunk-EI7MMDWY.js';var n=class extends i{static{a(this,"Ddu64Node");}#e;#o;#t;constructor(e,r,o){let t=b(e,r,o),c=t.dduOptions?.adapter!==void 0||t.dduOptions?.adapterFactory!==void 0,d={...t.dduOptions,...t.dduChar!==void 0?{dduChar:t.dduChar}:{},...t.paddingChar!==void 0?{paddingChar:t.paddingChar}:{},asyncAdapterFactory:t.dduOptions?.asyncAdapterFactory??(c?void 0:()=>import('./NodeAdapter-YP22CLUP.js').then(({NodeAdapter:s})=>new s)),obfuscationLayerFactory:t.dduOptions?.obfuscationLayerFactory??(s=>new a$1(s))};super(d),this.#e=d.compress===true,this.#o=d.encryptionKey!==void 0,this.#t=c;}encode(e,r){return this.#r("encode",r),super.encode(e,r)}decodeToUint8Array(e,r){return this.#r("decode",r),super.decodeToUint8Array(e,r)}getStats(e,r){return this.#r("encode",r,false),super.getStats(e,r)}decodeToBuffer(e,r){let o=this.decodeToUint8Array(e,r);return Buffer.from(o.buffer,o.byteOffset,o.byteLength)}async decodeToBufferAsync(e,r){let o=await this.decodeToUint8ArrayAsync(e,r);return Buffer.from(o.buffer,o.byteOffset,o.byteLength)}#r(e,r,o=true){if(!this.#t&&((r?.compress??this.#e)===true||o&&this.#o))throw new m("@ddunigma/node: use encodeAsync/decodeAsync/getStatsAsync, or @ddunigma/node/secure for sync secure options.",e)}};export{n as Ddu64,n as Ddu64Node};
|
package/dist/secure.browser.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkDAHLP6QA_cjs=require('./chunk-DAHLP6QA.cjs'),chunkBUR4IORD_cjs=require('./chunk-BUR4IORD.cjs'),chunkJATMOMX5_cjs=require('./chunk-JATMOMX5.cjs'),chunkZMNWFYGY_cjs=require('./chunk-ZMNWFYGY.cjs'),chunkZTGECGM2_cjs=require('./chunk-ZTGECGM2.cjs');require('./chunk-JY2ZPBJK.cjs');var chunkBCUBYE76_cjs=require('./chunk-BCUBYE76.cjs');async function I(){return new chunkZMNWFYGY_cjs.a}chunkBCUBYE76_cjs.a(I,"getAdapter");Object.defineProperty(exports,"Ddu64",{enumerable:true,get:function(){return chunkDAHLP6QA_cjs.a}});Object.defineProperty(exports,"Ddu64SecureBrowser",{enumerable:true,get:function(){return chunkDAHLP6QA_cjs.a}});Object.defineProperty(exports,"createReadableDecodeStream",{enumerable:true,get:function(){return chunkDAHLP6QA_cjs.c}});Object.defineProperty(exports,"createReadableEncodeStream",{enumerable:true,get:function(){return chunkDAHLP6QA_cjs.b}});Object.defineProperty(exports,"HangulObfuscationLayer",{enumerable:true,get:function(){return chunkBUR4IORD_cjs.a}});Object.defineProperty(exports,"createEncoderObfuscationLayer",{enumerable:true,get:function(){return chunkBUR4IORD_cjs.b}});Object.defineProperty(exports,"detectRuntime",{enumerable:true,get:function(){return chunkBUR4IORD_cjs.c}});Object.defineProperty(exports,"CharsetBuilder",{enumerable:true,get:function(){return chunkJATMOMX5_cjs.j}});Object.defineProperty(exports,"Ddu64Core",{enumerable:true,get:function(){return chunkJATMOMX5_cjs.i}});Object.defineProperty(exports,"DduSetSymbol",{enumerable:true,get:function(){return chunkJATMOMX5_cjs.a}});Object.defineProperty(exports,"BrowserAdapter",{enumerable:true,get:function(){return chunkZMNWFYGY_cjs.a}});Object.defineProperty(exports,"Ddu64AdapterError",{enumerable:true,get:function(){return chunkZTGECGM2_cjs.m}});Object.defineProperty(exports,"Ddu64CharsetError",{enumerable:true,get:function(){return chunkZTGECGM2_cjs.j}});Object.defineProperty(exports,"Ddu64ChecksumError",{enumerable:true,get:function(){return chunkZTGECGM2_cjs.i}});Object.defineProperty(exports,"Ddu64CompressionError",{enumerable:true,get:function(){return chunkZTGECGM2_cjs.e}});Object.defineProperty(exports,"Ddu64DecodeError",{enumerable:true,get:function(){return chunkZTGECGM2_cjs.d}});Object.defineProperty(exports,"Ddu64DecompressionError",{enumerable:true,get:function(){return chunkZTGECGM2_cjs.f}});Object.defineProperty(exports,"Ddu64DecryptionError",{enumerable:true,get:function(){return chunkZTGECGM2_cjs.h}});Object.defineProperty(exports,"Ddu64EncodeError",{enumerable:true,get:function(){return chunkZTGECGM2_cjs.c}});Object.defineProperty(exports,"Ddu64EncryptionError",{enumerable:true,get:function(){return chunkZTGECGM2_cjs.g}});Object.defineProperty(exports,"Ddu64Error",{enumerable:true,get:function(){return chunkZTGECGM2_cjs.b}});Object.defineProperty(exports,"Ddu64ErrorCode",{enumerable:true,get:function(){return chunkZTGECGM2_cjs.a}});Object.defineProperty(exports,"Ddu64InvalidInputError",{enumerable:true,get:function(){return chunkZTGECGM2_cjs.k}});Object.defineProperty(exports,"Ddu64LimitError",{enumerable:true,get:function(){return chunkZTGECGM2_cjs.l}});Object.defineProperty(exports,"Ddu64ObfuscationError",{enumerable:true,get:function(){return chunkZTGECGM2_cjs.n}});Object.defineProperty(exports,"Ddu64StreamError",{enumerable:true,get:function(){return chunkZTGECGM2_cjs.o}});Object.defineProperty(exports,"isDdu64Error",{enumerable:true,get:function(){return chunkZTGECGM2_cjs.p}});exports.getAdapter=I;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { B as BrowserAdapter } from './WebStreams-
|
|
2
|
-
export { D as Ddu64, D as Ddu64SecureBrowser, c as createReadableDecodeStream, a as createReadableEncodeStream } from './WebStreams-
|
|
3
|
-
export { C as CharSetConfig, d as CharSetInfo, e as CharsetBuilder, f as Ddu64AdapterError, g as Ddu64CharsetError, h as Ddu64ChecksumError, i as Ddu64CompressionError, D as Ddu64Core, j as Ddu64DecodeError, k as Ddu64DecompressionError, l as Ddu64DecryptionError, m as Ddu64EncodeError, n as Ddu64EncryptionError, o as Ddu64Error, p as Ddu64ErrorCode, q as Ddu64ErrorOptions, r as Ddu64InvalidInputError, s as Ddu64LimitError, t as Ddu64ObfuscationError, u as Ddu64Operation, v as Ddu64StreamError,
|
|
4
|
-
export { H as HangulObfuscationLayer, c as createEncoderObfuscationLayer, d as detectRuntime } from './ObfuscationLayer-
|
|
1
|
+
import { B as BrowserAdapter } from './WebStreams-DY1ovJBp.cjs';
|
|
2
|
+
export { D as Ddu64, D as Ddu64SecureBrowser, c as createReadableDecodeStream, a as createReadableEncodeStream } from './WebStreams-DY1ovJBp.cjs';
|
|
3
|
+
export { C as CharSetConfig, d as CharSetInfo, e as CharsetBuilder, f as Ddu64AdapterError, g as Ddu64CharsetError, h as Ddu64ChecksumError, i as Ddu64CompressionError, D as Ddu64Core, j as Ddu64DecodeError, k as Ddu64DecompressionError, l as Ddu64DecryptionError, m as Ddu64EncodeError, n as Ddu64EncryptionError, o as Ddu64Error, p as Ddu64ErrorCode, q as Ddu64ErrorOptions, r as Ddu64InvalidInputError, s as Ddu64LimitError, t as Ddu64ObfuscationError, u as Ddu64Operation, v as Ddu64StreamError, w as DduBaseConstructorOptions, x as DduBaseOptions, y as DduConstructorOptions, c as DduEncodeStats, b as DduOptions, z as DduProgressInfo, a as DduSecureConstructorOptions, A as DduSecureOptions, B as DduSetSymbol, E as DduSetSymbolInput, I as DduStreamOptions, F as EncodingProfile, K as KeyDerivationAlgorithm, G as KeyDerivationOptions, O as ObfuscationLayer, P as PlatformAdapter, H as isDdu64Error } from './core-DCeItMgU.cjs';
|
|
4
|
+
export { H as HangulObfuscationLayer, c as createEncoderObfuscationLayer, d as detectRuntime } from './ObfuscationLayer-C5TQHpYX.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Secure 진입점 (브라우저 조건 빌드).
|
package/dist/secure.browser.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { B as BrowserAdapter } from './WebStreams-
|
|
2
|
-
export { D as Ddu64, D as Ddu64SecureBrowser, c as createReadableDecodeStream, a as createReadableEncodeStream } from './WebStreams-
|
|
3
|
-
export { C as CharSetConfig, d as CharSetInfo, e as CharsetBuilder, f as Ddu64AdapterError, g as Ddu64CharsetError, h as Ddu64ChecksumError, i as Ddu64CompressionError, D as Ddu64Core, j as Ddu64DecodeError, k as Ddu64DecompressionError, l as Ddu64DecryptionError, m as Ddu64EncodeError, n as Ddu64EncryptionError, o as Ddu64Error, p as Ddu64ErrorCode, q as Ddu64ErrorOptions, r as Ddu64InvalidInputError, s as Ddu64LimitError, t as Ddu64ObfuscationError, u as Ddu64Operation, v as Ddu64StreamError,
|
|
4
|
-
export { H as HangulObfuscationLayer, c as createEncoderObfuscationLayer, d as detectRuntime } from './ObfuscationLayer-
|
|
1
|
+
import { B as BrowserAdapter } from './WebStreams-DynLi09H.js';
|
|
2
|
+
export { D as Ddu64, D as Ddu64SecureBrowser, c as createReadableDecodeStream, a as createReadableEncodeStream } from './WebStreams-DynLi09H.js';
|
|
3
|
+
export { C as CharSetConfig, d as CharSetInfo, e as CharsetBuilder, f as Ddu64AdapterError, g as Ddu64CharsetError, h as Ddu64ChecksumError, i as Ddu64CompressionError, D as Ddu64Core, j as Ddu64DecodeError, k as Ddu64DecompressionError, l as Ddu64DecryptionError, m as Ddu64EncodeError, n as Ddu64EncryptionError, o as Ddu64Error, p as Ddu64ErrorCode, q as Ddu64ErrorOptions, r as Ddu64InvalidInputError, s as Ddu64LimitError, t as Ddu64ObfuscationError, u as Ddu64Operation, v as Ddu64StreamError, w as DduBaseConstructorOptions, x as DduBaseOptions, y as DduConstructorOptions, c as DduEncodeStats, b as DduOptions, z as DduProgressInfo, a as DduSecureConstructorOptions, A as DduSecureOptions, B as DduSetSymbol, E as DduSetSymbolInput, I as DduStreamOptions, F as EncodingProfile, K as KeyDerivationAlgorithm, G as KeyDerivationOptions, O as ObfuscationLayer, P as PlatformAdapter, H as isDdu64Error } from './core-DCeItMgU.js';
|
|
4
|
+
export { H as HangulObfuscationLayer, c as createEncoderObfuscationLayer, d as detectRuntime } from './ObfuscationLayer-DmlvbjTB.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Secure 진입점 (브라우저 조건 빌드).
|
package/dist/secure.browser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as Ddu64,a as Ddu64SecureBrowser,c as createReadableDecodeStream,b as createReadableEncodeStream}from'./chunk-
|
|
1
|
+
export{a as Ddu64,a as Ddu64SecureBrowser,c as createReadableDecodeStream,b as createReadableEncodeStream}from'./chunk-GR2WPLDK.js';export{a as HangulObfuscationLayer,b as createEncoderObfuscationLayer,c as detectRuntime}from'./chunk-XVV2OPRV.js';export{j as CharsetBuilder,i as Ddu64Core,a as DduSetSymbol}from'./chunk-B4QRMN45.js';import {a as a$1}from'./chunk-C2AT5XRJ.js';export{a as BrowserAdapter}from'./chunk-C2AT5XRJ.js';export{m as Ddu64AdapterError,j as Ddu64CharsetError,i as Ddu64ChecksumError,e as Ddu64CompressionError,d as Ddu64DecodeError,f as Ddu64DecompressionError,h as Ddu64DecryptionError,c as Ddu64EncodeError,g as Ddu64EncryptionError,b as Ddu64Error,a as Ddu64ErrorCode,k as Ddu64InvalidInputError,l as Ddu64LimitError,n as Ddu64ObfuscationError,o as Ddu64StreamError,p as isDdu64Error}from'./chunk-IZK7KCU7.js';import'./chunk-Q6SCBUV2.js';import {a}from'./chunk-EI7MMDWY.js';async function I(){return new a$1}a(I,"getAdapter");export{I as getAdapter};
|
package/dist/secure.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkDAHLP6QA_cjs=require('./chunk-DAHLP6QA.cjs'),chunkBUR4IORD_cjs=require('./chunk-BUR4IORD.cjs'),chunkJATMOMX5_cjs=require('./chunk-JATMOMX5.cjs'),chunkZMNWFYGY_cjs=require('./chunk-ZMNWFYGY.cjs'),chunkZTGECGM2_cjs=require('./chunk-ZTGECGM2.cjs'),chunk76X5J2OF_cjs=require('./chunk-76X5J2OF.cjs');require('./chunk-JY2ZPBJK.cjs');var chunkBCUBYE76_cjs=require('./chunk-BCUBYE76.cjs');var n=class extends chunkJATMOMX5_cjs.i{static{chunkBCUBYE76_cjs.a(this,"Ddu64Secure");}constructor(r,t,e){let o=chunkJATMOMX5_cjs.b(r,t,e),m={...o.dduOptions,...o.dduChar!==void 0?{dduChar:o.dduChar}:{},...o.paddingChar!==void 0?{paddingChar:o.paddingChar}:{},adapterFactory:o.dduOptions?.adapterFactory??(()=>new chunk76X5J2OF_cjs.a),obfuscationLayerFactory:o.dduOptions?.obfuscationLayerFactory??(D=>new chunkBUR4IORD_cjs.a(D))};super(m);}decodeToBuffer(r,t){let e=this.decodeToUint8Array(r,t);return Buffer.from(e.buffer,e.byteOffset,e.byteLength)}async decodeToBufferAsync(r,t){let e=await this.decodeToUint8ArrayAsync(r,t);return Buffer.from(e.buffer,e.byteOffset,e.byteLength)}};async function k(){let s=chunkBUR4IORD_cjs.c();switch(s){case "node":{let{NodeAdapter:r}=await import('./NodeAdapter-4R7CNTHP.cjs');return new r}case "deno":case "bun":case "browser":case "edge":{let{BrowserAdapter:r}=await import('./BrowserAdapter-NXLXZCJX.cjs');return new r(s)}default:throw new chunkZTGECGM2_cjs.m("[ddunigma] No suitable crypto provider found. Detected runtime lacks both Node.js crypto module and Web Crypto API (SubtleCrypto).","adapter")}}chunkBCUBYE76_cjs.a(k,"getAdapter");Object.defineProperty(exports,"Ddu64SecureBrowser",{enumerable:true,get:function(){return chunkDAHLP6QA_cjs.a}});Object.defineProperty(exports,"createReadableDecodeStream",{enumerable:true,get:function(){return chunkDAHLP6QA_cjs.c}});Object.defineProperty(exports,"createReadableEncodeStream",{enumerable:true,get:function(){return chunkDAHLP6QA_cjs.b}});Object.defineProperty(exports,"HangulObfuscationLayer",{enumerable:true,get:function(){return chunkBUR4IORD_cjs.a}});Object.defineProperty(exports,"createEncoderObfuscationLayer",{enumerable:true,get:function(){return chunkBUR4IORD_cjs.b}});Object.defineProperty(exports,"detectRuntime",{enumerable:true,get:function(){return chunkBUR4IORD_cjs.c}});Object.defineProperty(exports,"CharsetBuilder",{enumerable:true,get:function(){return chunkJATMOMX5_cjs.j}});Object.defineProperty(exports,"Ddu64Core",{enumerable:true,get:function(){return chunkJATMOMX5_cjs.i}});Object.defineProperty(exports,"DduSetSymbol",{enumerable:true,get:function(){return chunkJATMOMX5_cjs.a}});Object.defineProperty(exports,"BrowserAdapter",{enumerable:true,get:function(){return chunkZMNWFYGY_cjs.a}});Object.defineProperty(exports,"Ddu64AdapterError",{enumerable:true,get:function(){return chunkZTGECGM2_cjs.m}});Object.defineProperty(exports,"Ddu64CharsetError",{enumerable:true,get:function(){return chunkZTGECGM2_cjs.j}});Object.defineProperty(exports,"Ddu64ChecksumError",{enumerable:true,get:function(){return chunkZTGECGM2_cjs.i}});Object.defineProperty(exports,"Ddu64CompressionError",{enumerable:true,get:function(){return chunkZTGECGM2_cjs.e}});Object.defineProperty(exports,"Ddu64DecodeError",{enumerable:true,get:function(){return chunkZTGECGM2_cjs.d}});Object.defineProperty(exports,"Ddu64DecompressionError",{enumerable:true,get:function(){return chunkZTGECGM2_cjs.f}});Object.defineProperty(exports,"Ddu64DecryptionError",{enumerable:true,get:function(){return chunkZTGECGM2_cjs.h}});Object.defineProperty(exports,"Ddu64EncodeError",{enumerable:true,get:function(){return chunkZTGECGM2_cjs.c}});Object.defineProperty(exports,"Ddu64EncryptionError",{enumerable:true,get:function(){return chunkZTGECGM2_cjs.g}});Object.defineProperty(exports,"Ddu64Error",{enumerable:true,get:function(){return chunkZTGECGM2_cjs.b}});Object.defineProperty(exports,"Ddu64ErrorCode",{enumerable:true,get:function(){return chunkZTGECGM2_cjs.a}});Object.defineProperty(exports,"Ddu64InvalidInputError",{enumerable:true,get:function(){return chunkZTGECGM2_cjs.k}});Object.defineProperty(exports,"Ddu64LimitError",{enumerable:true,get:function(){return chunkZTGECGM2_cjs.l}});Object.defineProperty(exports,"Ddu64ObfuscationError",{enumerable:true,get:function(){return chunkZTGECGM2_cjs.n}});Object.defineProperty(exports,"Ddu64StreamError",{enumerable:true,get:function(){return chunkZTGECGM2_cjs.o}});Object.defineProperty(exports,"isDdu64Error",{enumerable:true,get:function(){return chunkZTGECGM2_cjs.p}});Object.defineProperty(exports,"NodeAdapter",{enumerable:true,get:function(){return chunk76X5J2OF_cjs.a}});exports.Ddu64=n;exports.Ddu64Secure=n;exports.getAdapter=k;
|
package/dist/secure.d.cts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { D as Ddu64Core,
|
|
2
|
-
export { C as CharSetConfig, d as CharSetInfo, e as CharsetBuilder, f as Ddu64AdapterError, g as Ddu64CharsetError, h as Ddu64ChecksumError, i as Ddu64CompressionError, j as Ddu64DecodeError, k as Ddu64DecompressionError, l as Ddu64DecryptionError, m as Ddu64EncodeError, n as Ddu64EncryptionError, o as Ddu64Error, p as Ddu64ErrorCode, q as Ddu64ErrorOptions, r as Ddu64InvalidInputError, s as Ddu64LimitError, t as Ddu64ObfuscationError, u as Ddu64Operation, v as Ddu64StreamError,
|
|
3
|
-
export { B as BrowserAdapter, D as Ddu64SecureBrowser, c as createReadableDecodeStream, a as createReadableEncodeStream } from './WebStreams-
|
|
4
|
-
export { H as HangulObfuscationLayer, c as createEncoderObfuscationLayer, d as detectRuntime } from './ObfuscationLayer-
|
|
1
|
+
import { D as Ddu64Core, a as DduSecureConstructorOptions, A as DduSecureOptions, P as PlatformAdapter, G as KeyDerivationOptions } from './core-DCeItMgU.cjs';
|
|
2
|
+
export { C as CharSetConfig, d as CharSetInfo, e as CharsetBuilder, f as Ddu64AdapterError, g as Ddu64CharsetError, h as Ddu64ChecksumError, i as Ddu64CompressionError, j as Ddu64DecodeError, k as Ddu64DecompressionError, l as Ddu64DecryptionError, m as Ddu64EncodeError, n as Ddu64EncryptionError, o as Ddu64Error, p as Ddu64ErrorCode, q as Ddu64ErrorOptions, r as Ddu64InvalidInputError, s as Ddu64LimitError, t as Ddu64ObfuscationError, u as Ddu64Operation, v as Ddu64StreamError, w as DduBaseConstructorOptions, x as DduBaseOptions, y as DduConstructorOptions, c as DduEncodeStats, b as DduOptions, z as DduProgressInfo, B as DduSetSymbol, E as DduSetSymbolInput, I as DduStreamOptions, F as EncodingProfile, K as KeyDerivationAlgorithm, O as ObfuscationLayer, H as isDdu64Error } from './core-DCeItMgU.cjs';
|
|
3
|
+
export { B as BrowserAdapter, D as Ddu64SecureBrowser, c as createReadableDecodeStream, a as createReadableEncodeStream } from './WebStreams-DY1ovJBp.cjs';
|
|
4
|
+
export { H as HangulObfuscationLayer, c as createEncoderObfuscationLayer, d as detectRuntime } from './ObfuscationLayer-C5TQHpYX.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Node.js 전용 secure Ddu64 래퍼.
|
|
8
8
|
*
|
|
9
9
|
* Ddu64Core를 확장하여 압축/암호화/체크섬(배터리 포함)과 Node.js Buffer를 지원합니다:
|
|
10
|
-
* - NodeAdapter 자동 주입 (zlib/crypto) →
|
|
10
|
+
* - NodeAdapter 자동 주입 (zlib/crypto) → 압축/암호화 사용 가능
|
|
11
|
+
* - 코어 CRC32 체크섬 사용 가능
|
|
11
12
|
* - HangulObfuscationLayer 자동 주입 → 한글 난독화 사용 가능
|
|
12
13
|
* - Node.js Buffer를 반환하는 `decodeToBuffer` 및 `decodeToBufferAsync` 제공
|
|
13
14
|
* - encode()에 Buffer 입력 허용 (Buffer는 Uint8Array를 확장)
|
|
14
15
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* (`@ddunigma/node/secure`)으로 이전되었습니다.
|
|
16
|
+
* 기본 진입점도 비동기 secure 작업을 lazy adapter로 처리합니다. 이 진입점은 NodeAdapter를
|
|
17
|
+
* 정적으로 포함해 동기 압축·암복호화와 Web Streams까지 명시적으로 사용하는 경로입니다.
|
|
18
18
|
*
|
|
19
19
|
* @module Ddu64Secure
|
|
20
20
|
*/
|
|
@@ -22,7 +22,7 @@ export { H as HangulObfuscationLayer, c as createEncoderObfuscationLayer, d as d
|
|
|
22
22
|
/**
|
|
23
23
|
* Node.js 전용 secure Ddu64 인코더/디코더.
|
|
24
24
|
*
|
|
25
|
-
* Ddu64Core를 래핑하여 자동 NodeAdapter 주입(
|
|
25
|
+
* Ddu64Core를 래핑하여 자동 NodeAdapter 주입(압축/암호화)과
|
|
26
26
|
* 하위 호환성을 위한 Buffer 반환 디코드 메서드를 제공합니다.
|
|
27
27
|
*
|
|
28
28
|
* @example
|
package/dist/secure.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { D as Ddu64Core,
|
|
2
|
-
export { C as CharSetConfig, d as CharSetInfo, e as CharsetBuilder, f as Ddu64AdapterError, g as Ddu64CharsetError, h as Ddu64ChecksumError, i as Ddu64CompressionError, j as Ddu64DecodeError, k as Ddu64DecompressionError, l as Ddu64DecryptionError, m as Ddu64EncodeError, n as Ddu64EncryptionError, o as Ddu64Error, p as Ddu64ErrorCode, q as Ddu64ErrorOptions, r as Ddu64InvalidInputError, s as Ddu64LimitError, t as Ddu64ObfuscationError, u as Ddu64Operation, v as Ddu64StreamError,
|
|
3
|
-
export { B as BrowserAdapter, D as Ddu64SecureBrowser, c as createReadableDecodeStream, a as createReadableEncodeStream } from './WebStreams-
|
|
4
|
-
export { H as HangulObfuscationLayer, c as createEncoderObfuscationLayer, d as detectRuntime } from './ObfuscationLayer-
|
|
1
|
+
import { D as Ddu64Core, a as DduSecureConstructorOptions, A as DduSecureOptions, P as PlatformAdapter, G as KeyDerivationOptions } from './core-DCeItMgU.js';
|
|
2
|
+
export { C as CharSetConfig, d as CharSetInfo, e as CharsetBuilder, f as Ddu64AdapterError, g as Ddu64CharsetError, h as Ddu64ChecksumError, i as Ddu64CompressionError, j as Ddu64DecodeError, k as Ddu64DecompressionError, l as Ddu64DecryptionError, m as Ddu64EncodeError, n as Ddu64EncryptionError, o as Ddu64Error, p as Ddu64ErrorCode, q as Ddu64ErrorOptions, r as Ddu64InvalidInputError, s as Ddu64LimitError, t as Ddu64ObfuscationError, u as Ddu64Operation, v as Ddu64StreamError, w as DduBaseConstructorOptions, x as DduBaseOptions, y as DduConstructorOptions, c as DduEncodeStats, b as DduOptions, z as DduProgressInfo, B as DduSetSymbol, E as DduSetSymbolInput, I as DduStreamOptions, F as EncodingProfile, K as KeyDerivationAlgorithm, O as ObfuscationLayer, H as isDdu64Error } from './core-DCeItMgU.js';
|
|
3
|
+
export { B as BrowserAdapter, D as Ddu64SecureBrowser, c as createReadableDecodeStream, a as createReadableEncodeStream } from './WebStreams-DynLi09H.js';
|
|
4
|
+
export { H as HangulObfuscationLayer, c as createEncoderObfuscationLayer, d as detectRuntime } from './ObfuscationLayer-DmlvbjTB.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Node.js 전용 secure Ddu64 래퍼.
|
|
8
8
|
*
|
|
9
9
|
* Ddu64Core를 확장하여 압축/암호화/체크섬(배터리 포함)과 Node.js Buffer를 지원합니다:
|
|
10
|
-
* - NodeAdapter 자동 주입 (zlib/crypto) →
|
|
10
|
+
* - NodeAdapter 자동 주입 (zlib/crypto) → 압축/암호화 사용 가능
|
|
11
|
+
* - 코어 CRC32 체크섬 사용 가능
|
|
11
12
|
* - HangulObfuscationLayer 자동 주입 → 한글 난독화 사용 가능
|
|
12
13
|
* - Node.js Buffer를 반환하는 `decodeToBuffer` 및 `decodeToBufferAsync` 제공
|
|
13
14
|
* - encode()에 Buffer 입력 허용 (Buffer는 Uint8Array를 확장)
|
|
14
15
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* (`@ddunigma/node/secure`)으로 이전되었습니다.
|
|
16
|
+
* 기본 진입점도 비동기 secure 작업을 lazy adapter로 처리합니다. 이 진입점은 NodeAdapter를
|
|
17
|
+
* 정적으로 포함해 동기 압축·암복호화와 Web Streams까지 명시적으로 사용하는 경로입니다.
|
|
18
18
|
*
|
|
19
19
|
* @module Ddu64Secure
|
|
20
20
|
*/
|
|
@@ -22,7 +22,7 @@ export { H as HangulObfuscationLayer, c as createEncoderObfuscationLayer, d as d
|
|
|
22
22
|
/**
|
|
23
23
|
* Node.js 전용 secure Ddu64 인코더/디코더.
|
|
24
24
|
*
|
|
25
|
-
* Ddu64Core를 래핑하여 자동 NodeAdapter 주입(
|
|
25
|
+
* Ddu64Core를 래핑하여 자동 NodeAdapter 주입(압축/암호화)과
|
|
26
26
|
* 하위 호환성을 위한 Buffer 반환 디코드 메서드를 제공합니다.
|
|
27
27
|
*
|
|
28
28
|
* @example
|
package/dist/secure.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as Ddu64SecureBrowser,c as createReadableDecodeStream,b as createReadableEncodeStream}from'./chunk-
|
|
1
|
+
export{a as Ddu64SecureBrowser,c as createReadableDecodeStream,b as createReadableEncodeStream}from'./chunk-GR2WPLDK.js';import {a as a$1,c}from'./chunk-XVV2OPRV.js';export{a as HangulObfuscationLayer,b as createEncoderObfuscationLayer,c as detectRuntime}from'./chunk-XVV2OPRV.js';import {i,b}from'./chunk-B4QRMN45.js';export{j as CharsetBuilder,i as Ddu64Core,a as DduSetSymbol}from'./chunk-B4QRMN45.js';export{a as BrowserAdapter}from'./chunk-C2AT5XRJ.js';import {m}from'./chunk-IZK7KCU7.js';export{m as Ddu64AdapterError,j as Ddu64CharsetError,i as Ddu64ChecksumError,e as Ddu64CompressionError,d as Ddu64DecodeError,f as Ddu64DecompressionError,h as Ddu64DecryptionError,c as Ddu64EncodeError,g as Ddu64EncryptionError,b as Ddu64Error,a as Ddu64ErrorCode,k as Ddu64InvalidInputError,l as Ddu64LimitError,n as Ddu64ObfuscationError,o as Ddu64StreamError,p as isDdu64Error}from'./chunk-IZK7KCU7.js';import {a as a$2}from'./chunk-7EPVCA2F.js';export{a as NodeAdapter}from'./chunk-7EPVCA2F.js';import'./chunk-Q6SCBUV2.js';import {a}from'./chunk-EI7MMDWY.js';var n=class extends i{static{a(this,"Ddu64Secure");}constructor(r,t,e){let o=b(r,t,e),m={...o.dduOptions,...o.dduChar!==void 0?{dduChar:o.dduChar}:{},...o.paddingChar!==void 0?{paddingChar:o.paddingChar}:{},adapterFactory:o.dduOptions?.adapterFactory??(()=>new a$2),obfuscationLayerFactory:o.dduOptions?.obfuscationLayerFactory??(D=>new a$1(D))};super(m);}decodeToBuffer(r,t){let e=this.decodeToUint8Array(r,t);return Buffer.from(e.buffer,e.byteOffset,e.byteLength)}async decodeToBufferAsync(r,t){let e=await this.decodeToUint8ArrayAsync(r,t);return Buffer.from(e.buffer,e.byteOffset,e.byteLength)}};async function k(){let s=c();switch(s){case "node":{let{NodeAdapter:r}=await import('./NodeAdapter-YP22CLUP.js');return new r}case "deno":case "bun":case "browser":case "edge":{let{BrowserAdapter:r}=await import('./BrowserAdapter-FJYE5LZO.js');return new r(s)}default:throw new m("[ddunigma] No suitable crypto provider found. Detected runtime lacks both Node.js crypto module and Web Crypto API (SubtleCrypto).","adapter")}}a(k,"getAdapter");export{n as Ddu64,n as Ddu64Secure,k as getAdapter};
|
package/docs/REFERENCE.md
CHANGED
|
@@ -66,9 +66,15 @@ charset 문자와 `paddingChar`는 각각 단일 UTF-16 코드 유닛이어야
|
|
|
66
66
|
| `requireEncryption` | `boolean` | 키 사용 시 `true` | 키가 있는 decoder에서 평문 payload 거부 |
|
|
67
67
|
| `onProgress` | `(info: DduProgressInfo) => void` | 미사용 | 처리 진행률 콜백 |
|
|
68
68
|
|
|
69
|
-
`
|
|
70
|
-
`
|
|
71
|
-
|
|
69
|
+
`maxEncodedChars`의 자동값은 `maxDecodedBytes * 4 + 1024`입니다. 호출 옵션에서
|
|
70
|
+
`maxDecodedBytes`를 더 작게 지정하면 명시적인 `maxEncodedChars`가 없는 한 원시 입력 상한도
|
|
71
|
+
함께 낮아집니다. `chunkSize: 1`과 긴 사용자 구분자처럼 조밀한 청킹을 사용한다면
|
|
72
|
+
`maxEncodedChars`를 별도로 지정하세요.
|
|
73
|
+
|
|
74
|
+
`@ddunigma/node`와 `@ddunigma/node/browser`는 비동기 파이프라인이 실제 압축·암복호화
|
|
75
|
+
단계에 도달할 때만 플랫폼 adapter를 동적 import해 현재 core에 주입합니다. 동기
|
|
76
|
+
압축/암호화는 `@ddunigma/node/secure`를 사용하세요. `checksum`/`checksumScope`/청킹/
|
|
77
|
+
난독화는 플랫폼 어댑터 없이도 동작합니다.
|
|
72
78
|
|
|
73
79
|
Web Streams API는 축적 모드 메모리 제한용 `maxBufferedBytes`(인코딩, 기본 64 MiB)와
|
|
74
80
|
`maxBufferedChars`(디코딩, 기본 64 Mi 문자)를 추가로 지원합니다.
|
|
@@ -86,16 +92,16 @@ Web Streams API는 축적 모드 메모리 제한용 `maxBufferedBytes`(인코
|
|
|
86
92
|
| `useRepeatPadding` | `boolean` | 프리셋 설정 | 반복 패딩 방식 사용 |
|
|
87
93
|
| `throwOnError` | `boolean` | `true` | 잘못된 charset 설정에서 예외 발생 |
|
|
88
94
|
| `urlSafe` | `boolean` | `false` | URL-Safe 출력 변환 |
|
|
89
|
-
| `encryptionKey` | `string` | 미사용 | AES-256-GCM 암호화 키
|
|
90
|
-
| `keyDerivation` | `KeyDerivationOptions` | `pbkdf2` | 암호화 키 파생 방식
|
|
95
|
+
| `encryptionKey` | `string` | 미사용 | AES-256-GCM 암호화 키 |
|
|
96
|
+
| `keyDerivation` | `KeyDerivationOptions` | `pbkdf2` | 암호화 키 파생 방식 |
|
|
91
97
|
| `adapter` | `PlatformAdapter` | 진입점 설정 | 플랫폼 어댑터 직접 주입 |
|
|
92
98
|
|
|
93
99
|
## 압축, 암호화, 체크섬
|
|
94
100
|
|
|
95
|
-
|
|
101
|
+
기본 진입점은 비동기 메서드에서 압축/암호화 어댑터를 필요할 때만 불러옵니다.
|
|
96
102
|
|
|
97
103
|
```typescript
|
|
98
|
-
import { Ddu64 } from "@ddunigma/node
|
|
104
|
+
import { Ddu64 } from "@ddunigma/node";
|
|
99
105
|
|
|
100
106
|
const ddu = new Ddu64({
|
|
101
107
|
compress: true,
|
|
@@ -110,12 +116,18 @@ const ddu = new Ddu64({
|
|
|
110
116
|
checksum: true,
|
|
111
117
|
});
|
|
112
118
|
|
|
113
|
-
const encoded = ddu.
|
|
114
|
-
const decoded = ddu.
|
|
119
|
+
const encoded = await ddu.encodeAsync("보호할 데이터");
|
|
120
|
+
const decoded = await ddu.decodeAsync(encoded);
|
|
115
121
|
```
|
|
116
122
|
|
|
123
|
+
동기 압축/암호화나 Web Streams가 필요하면 `@ddunigma/node/secure`를 사용합니다.
|
|
124
|
+
압축 여부와 알고리즘은 footer에서 판별하므로 decode 쪽에 `compress` 옵션을 반복할
|
|
125
|
+
필요가 없습니다.
|
|
126
|
+
|
|
117
127
|
복호화에는 인코딩에 사용한 `encryptionKey`와 키 파생 설정(`algorithm`/`salt`/`iterations`)이
|
|
118
128
|
동일하게 필요합니다. 키 파생 파라미터는 wire format에 기록되지 않습니다.
|
|
129
|
+
저엔트로피 비밀번호를 사용하면 application-specific `salt`와 명시적 PBKDF2 iteration을
|
|
130
|
+
설정하세요. 기본 210,000회·고정 fallback salt는 기존 데이터 호환을 위해 유지됩니다.
|
|
119
131
|
|
|
120
132
|
`encryptionKey`가 설정된 인스턴스는 기본적으로 암호화 footer가 없는 payload를 거부합니다.
|
|
121
133
|
레거시 평문을 같은 인스턴스로 읽어야 하면 해당 decode 호출에 `requireEncryption: false`를
|
|
@@ -136,8 +148,9 @@ const decoded = ddu.decode(encoded);
|
|
|
136
148
|
|
|
137
149
|
## 한글 난독화
|
|
138
150
|
|
|
139
|
-
난독화는 암호화 키 없이 기본 진입점에서 바로 사용할 수 있습니다.
|
|
140
|
-
블록(U+AC00–U+D7A3)으로 가역 변환합니다.
|
|
151
|
+
난독화는 암호화 키 없이 기본 진입점에서 바로 사용할 수 있습니다. charset payload를
|
|
152
|
+
한글 음절 블록(U+AC00–U+D7A3)으로 1:1 가역 변환합니다. Checksum을 함께 사용하면
|
|
153
|
+
checksum marker와 값은 난독화 밖의 ASCII suffix로 남습니다.
|
|
141
154
|
|
|
142
155
|
```typescript
|
|
143
156
|
import { Ddu64 } from "@ddunigma/node";
|
|
@@ -147,18 +160,18 @@ const encoded = ddu.encode("재미있는 난독화");
|
|
|
147
160
|
const decoded = ddu.decode(encoded);
|
|
148
161
|
```
|
|
149
162
|
|
|
150
|
-
키 없는 난독화는 암호화가
|
|
151
|
-
`
|
|
163
|
+
키 없는 난독화는 암호화가 아니며 입력 빈도를 숨기지 않습니다. 기밀성이 필요하면
|
|
164
|
+
`encryptionKey`와 함께 사용하세요.
|
|
152
165
|
|
|
153
166
|
## 브라우저와 Workers
|
|
154
167
|
|
|
155
|
-
기본 브라우저 진입점(`@ddunigma/node/browser`)은
|
|
156
|
-
브라우저에서
|
|
157
|
-
|
|
158
|
-
|
|
168
|
+
기본 브라우저 진입점(`@ddunigma/node/browser`)은 codec·체크섬·난독화를 동기로 제공합니다.
|
|
169
|
+
브라우저에서 압축/암호화가 필요하면 같은 진입점의 비동기 메서드를 쓰면 됩니다.
|
|
170
|
+
해당 연산이 실제로 필요한 시점에만 BrowserAdapter(WebCrypto·CompressionStream 기반)를
|
|
171
|
+
동적 import합니다.
|
|
159
172
|
|
|
160
173
|
```typescript
|
|
161
|
-
import { Ddu64 } from "@ddunigma/node/
|
|
174
|
+
import { Ddu64 } from "@ddunigma/node/browser";
|
|
162
175
|
|
|
163
176
|
const ddu = new Ddu64({ compress: true, checksum: true });
|
|
164
177
|
const encoded = await ddu.encodeAsync("browser data");
|
|
@@ -189,16 +202,17 @@ const stats = ddu.getStats("payload");
|
|
|
189
202
|
const asyncStats = await ddu.getStatsAsync("payload", { compress: true });
|
|
190
203
|
```
|
|
191
204
|
|
|
192
|
-
|
|
205
|
+
브라우저의 압축 통계는 root의 `getStatsAsync`를 사용합니다. Web Streams는
|
|
206
|
+
`@ddunigma/node/secure`를 사용합니다.
|
|
193
207
|
|
|
194
208
|
## 진입점
|
|
195
209
|
|
|
196
|
-
| 진입점 | 노출 `Ddu64`
|
|
197
|
-
| ------------------------ |
|
|
198
|
-
| `@ddunigma/node` | `Ddu64Node`
|
|
199
|
-
| `@ddunigma/node/browser` | `Ddu64Browser`
|
|
200
|
-
| `@ddunigma/node/secure` | `Ddu64Secure`
|
|
201
|
-
| `@ddunigma/node/core` | `Ddu64Core`
|
|
210
|
+
| 진입점 | 노출 `Ddu64` | 기능 | 용도 |
|
|
211
|
+
| ------------------------ | -------------------------------------------------- | ------------------------------------------ | ---------------------------- |
|
|
212
|
+
| `@ddunigma/node` | `Ddu64Node` | codec/checksum/난독화 + async adapter lazy | Node 기본 |
|
|
213
|
+
| `@ddunigma/node/browser` | `Ddu64Browser` | codec/checksum/난독화 + async adapter lazy | 브라우저/Workers 기본 |
|
|
214
|
+
| `@ddunigma/node/secure` | Node: `Ddu64Secure`, browser: `Ddu64SecureBrowser` | sync/async 압축/암호화/체크섬/Web Streams | 보안·압축 배터리 명시 사용 |
|
|
215
|
+
| `@ddunigma/node/core` | `Ddu64Core` | 플랫폼 독립 codec/checksum | 어댑터/난독 미포함 최소 번들 |
|
|
202
216
|
|
|
203
217
|
```typescript
|
|
204
218
|
import { Ddu64 as NodeDdu64 } from "@ddunigma/node";
|
|
@@ -215,21 +229,20 @@ import { Ddu64 as CoreDdu64 } from "@ddunigma/node/core";
|
|
|
215
229
|
```typescript
|
|
216
230
|
import { Ddu64Core, DduSetSymbol } from "@ddunigma/node/core";
|
|
217
231
|
|
|
218
|
-
const enc = new Ddu64Core(
|
|
232
|
+
const enc = new Ddu64Core({ dduSetSymbol: DduSetSymbol.DDU });
|
|
219
233
|
const encoded = enc.encode("hello");
|
|
220
234
|
const decoded = enc.decode(encoded);
|
|
221
235
|
```
|
|
222
236
|
|
|
223
|
-
`/core`에서 압축·암호화를 쓰려면 `
|
|
224
|
-
|
|
237
|
+
`/core`에서 압축·암호화를 쓰려면 공개 `PlatformAdapter`를 `adapter`로 직접 주입하세요.
|
|
238
|
+
난독화까지 필요하면 내부 팩토리를 주입하기보다 root 진입점을 사용하는 편이 안정적입니다.
|
|
225
239
|
|
|
226
240
|
```typescript
|
|
227
241
|
import { Ddu64Core } from "@ddunigma/node/core";
|
|
228
|
-
import { NodeAdapter
|
|
242
|
+
import { NodeAdapter } from "@ddunigma/node/secure";
|
|
229
243
|
|
|
230
|
-
const enc = new Ddu64Core(
|
|
244
|
+
const enc = new Ddu64Core({
|
|
231
245
|
encryptionKey: "secret",
|
|
232
|
-
|
|
233
|
-
obfuscationLayerFactory: (alphabet) => new HangulObfuscationLayer(alphabet),
|
|
246
|
+
adapter: new NodeAdapter(),
|
|
234
247
|
});
|
|
235
248
|
```
|