@knowzai/crypto 0.1.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Knowz
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ {"fileNames":["../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2023.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2023.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/.pnpm/@vitest+pretty-format@2.1.9/node_modules/@vitest/pretty-format/dist/index.d.ts","../../../node_modules/.pnpm/@vitest+utils@2.1.9/node_modules/@vitest/utils/dist/types.d.ts","../../../node_modules/.pnpm/@vitest+utils@2.1.9/node_modules/@vitest/utils/dist/helpers.d.ts","../../../node_modules/.pnpm/tinyrainbow@1.2.0/node_modules/tinyrainbow/dist/index-c1cfc5e9.d.ts","../../../node_modules/.pnpm/tinyrainbow@1.2.0/node_modules/tinyrainbow/dist/node.d.ts","../../../node_modules/.pnpm/@vitest+utils@2.1.9/node_modules/@vitest/utils/dist/index.d.ts","../../../node_modules/.pnpm/@vitest+runner@2.1.9/node_modules/@vitest/runner/dist/tasks-3znpj1lr.d.ts","../../../node_modules/.pnpm/@vitest+utils@2.1.9/node_modules/@vitest/utils/dist/types-bxe-2udy.d.ts","../../../node_modules/.pnpm/@vitest+utils@2.1.9/node_modules/@vitest/utils/dist/diff.d.ts","../../../node_modules/.pnpm/@vitest+runner@2.1.9/node_modules/@vitest/runner/dist/types.d.ts","../../../node_modules/.pnpm/@vitest+utils@2.1.9/node_modules/@vitest/utils/dist/error.d.ts","../../../node_modules/.pnpm/@vitest+runner@2.1.9/node_modules/@vitest/runner/dist/index.d.ts","../../../node_modules/.pnpm/vitest@2.1.9_@types+node@22.19.19_msw@2.14.6_@types+node@22.19.19_typescript@5.9.3_/node_modules/vitest/dist/chunks/environment.looobwuu.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/compatibility/disposable.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/compatibility/indexable.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/compatibility/index.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/globals.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/web-globals/abortcontroller.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/web-globals/domexception.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/web-globals/events.d.ts","../../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/header.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/readable.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/file.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/fetch.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/formdata.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/connector.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/client.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/errors.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/global-origin.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/pool-stats.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/pool.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/handlers.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-client.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-pool.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-errors.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/retry-handler.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/retry-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/api.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/interceptors.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/util.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/cookies.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/patch.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/websocket.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/eventsource.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/filereader.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/content-type.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/cache.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/index.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/web-globals/fetch.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/web-globals/navigator.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/web-globals/storage.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/assert.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/assert/strict.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/async_hooks.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/buffer.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/child_process.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/cluster.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/console.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/constants.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/crypto.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/dgram.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/dns.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/dns/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/domain.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/events.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/fs.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/fs/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/http.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/http2.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/https.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/inspector.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/inspector.generated.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/module.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/net.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/os.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/path.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/process.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/punycode.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/querystring.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/readline.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/readline/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/repl.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/sea.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/sqlite.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/stream.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/stream/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/stream/web.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/string_decoder.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/test.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/timers.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/timers/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/tls.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/trace_events.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/tty.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/url.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/util.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/v8.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/vm.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/wasi.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/worker_threads.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/zlib.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/index.d.ts","../../../node_modules/.pnpm/@types+estree@1.0.8/node_modules/@types/estree/index.d.ts","../../../node_modules/.pnpm/rollup@4.60.4/node_modules/rollup/dist/rollup.d.ts","../../../node_modules/.pnpm/rollup@4.60.4/node_modules/rollup/dist/parseast.d.ts","../../../node_modules/.pnpm/vite@5.4.21_@types+node@22.19.19/node_modules/vite/types/hmrpayload.d.ts","../../../node_modules/.pnpm/vite@5.4.21_@types+node@22.19.19/node_modules/vite/types/customevent.d.ts","../../../node_modules/.pnpm/vite@5.4.21_@types+node@22.19.19/node_modules/vite/types/hot.d.ts","../../../node_modules/.pnpm/vite@5.4.21_@types+node@22.19.19/node_modules/vite/dist/node/types.d-agj9qkwt.d.ts","../../../node_modules/.pnpm/esbuild@0.21.5/node_modules/esbuild/lib/main.d.ts","../../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/source-map.d.ts","../../../node_modules/.pnpm/postcss@8.5.15/node_modules/postcss/lib/previous-map.d.ts","../../../node_modules/.pnpm/postcss@8.5.15/node_modules/postcss/lib/input.d.ts","../../../node_modules/.pnpm/postcss@8.5.15/node_modules/postcss/lib/css-syntax-error.d.ts","../../../node_modules/.pnpm/postcss@8.5.15/node_modules/postcss/lib/declaration.d.ts","../../../node_modules/.pnpm/postcss@8.5.15/node_modules/postcss/lib/root.d.ts","../../../node_modules/.pnpm/postcss@8.5.15/node_modules/postcss/lib/warning.d.ts","../../../node_modules/.pnpm/postcss@8.5.15/node_modules/postcss/lib/lazy-result.d.ts","../../../node_modules/.pnpm/postcss@8.5.15/node_modules/postcss/lib/no-work-result.d.ts","../../../node_modules/.pnpm/postcss@8.5.15/node_modules/postcss/lib/processor.d.ts","../../../node_modules/.pnpm/postcss@8.5.15/node_modules/postcss/lib/result.d.ts","../../../node_modules/.pnpm/postcss@8.5.15/node_modules/postcss/lib/document.d.ts","../../../node_modules/.pnpm/postcss@8.5.15/node_modules/postcss/lib/rule.d.ts","../../../node_modules/.pnpm/postcss@8.5.15/node_modules/postcss/lib/node.d.ts","../../../node_modules/.pnpm/postcss@8.5.15/node_modules/postcss/lib/comment.d.ts","../../../node_modules/.pnpm/postcss@8.5.15/node_modules/postcss/lib/container.d.ts","../../../node_modules/.pnpm/postcss@8.5.15/node_modules/postcss/lib/at-rule.d.ts","../../../node_modules/.pnpm/postcss@8.5.15/node_modules/postcss/lib/list.d.ts","../../../node_modules/.pnpm/postcss@8.5.15/node_modules/postcss/lib/postcss.d.ts","../../../node_modules/.pnpm/postcss@8.5.15/node_modules/postcss/lib/postcss.d.mts","../../../node_modules/.pnpm/vite@5.4.21_@types+node@22.19.19/node_modules/vite/dist/node/runtime.d.ts","../../../node_modules/.pnpm/vite@5.4.21_@types+node@22.19.19/node_modules/vite/types/importglob.d.ts","../../../node_modules/.pnpm/vite@5.4.21_@types+node@22.19.19/node_modules/vite/types/metadata.d.ts","../../../node_modules/.pnpm/vite@5.4.21_@types+node@22.19.19/node_modules/vite/dist/node/index.d.ts","../../../node_modules/.pnpm/@vitest+snapshot@2.1.9/node_modules/@vitest/snapshot/dist/environment-ddx0edty.d.ts","../../../node_modules/.pnpm/@vitest+snapshot@2.1.9/node_modules/@vitest/snapshot/dist/rawsnapshot-cpnkto81.d.ts","../../../node_modules/.pnpm/@vitest+snapshot@2.1.9/node_modules/@vitest/snapshot/dist/index.d.ts","../../../node_modules/.pnpm/@vitest+snapshot@2.1.9/node_modules/@vitest/snapshot/dist/environment.d.ts","../../../node_modules/.pnpm/vitest@2.1.9_@types+node@22.19.19_msw@2.14.6_@types+node@22.19.19_typescript@5.9.3_/node_modules/vitest/dist/chunks/config.cy0c388z.d.ts","../../../node_modules/.pnpm/vite-node@2.1.9_@types+node@22.19.19/node_modules/vite-node/dist/trace-mapping.d-dlvdeqop.d.ts","../../../node_modules/.pnpm/vite-node@2.1.9_@types+node@22.19.19/node_modules/vite-node/dist/index-z0r8hvru.d.ts","../../../node_modules/.pnpm/vite-node@2.1.9_@types+node@22.19.19/node_modules/vite-node/dist/index.d.ts","../../../node_modules/.pnpm/@vitest+utils@2.1.9/node_modules/@vitest/utils/dist/source-map.d.ts","../../../node_modules/.pnpm/vite-node@2.1.9_@types+node@22.19.19/node_modules/vite-node/dist/client.d.ts","../../../node_modules/.pnpm/vite-node@2.1.9_@types+node@22.19.19/node_modules/vite-node/dist/server.d.ts","../../../node_modules/.pnpm/@vitest+runner@2.1.9/node_modules/@vitest/runner/dist/utils.d.ts","../../../node_modules/.pnpm/tinybench@2.9.0/node_modules/tinybench/dist/index.d.ts","../../../node_modules/.pnpm/vitest@2.1.9_@types+node@22.19.19_msw@2.14.6_@types+node@22.19.19_typescript@5.9.3_/node_modules/vitest/dist/chunks/benchmark.geerunq4.d.ts","../../../node_modules/.pnpm/@vitest+snapshot@2.1.9/node_modules/@vitest/snapshot/dist/manager.d.ts","../../../node_modules/.pnpm/vitest@2.1.9_@types+node@22.19.19_msw@2.14.6_@types+node@22.19.19_typescript@5.9.3_/node_modules/vitest/dist/chunks/reporters.nr4dxcka.d.ts","../../../node_modules/.pnpm/vitest@2.1.9_@types+node@22.19.19_msw@2.14.6_@types+node@22.19.19_typescript@5.9.3_/node_modules/vitest/dist/chunks/worker.tn5kgiih.d.ts","../../../node_modules/.pnpm/vitest@2.1.9_@types+node@22.19.19_msw@2.14.6_@types+node@22.19.19_typescript@5.9.3_/node_modules/vitest/dist/chunks/worker.b9fxpcac.d.ts","../../../node_modules/.pnpm/vitest@2.1.9_@types+node@22.19.19_msw@2.14.6_@types+node@22.19.19_typescript@5.9.3_/node_modules/vitest/dist/chunks/vite.czkp4x9w.d.ts","../../../node_modules/.pnpm/@vitest+expect@2.1.9/node_modules/@vitest/expect/dist/chai.d.cts","../../../node_modules/.pnpm/@vitest+expect@2.1.9/node_modules/@vitest/expect/dist/index.d.ts","../../../node_modules/.pnpm/@vitest+expect@2.1.9/node_modules/@vitest/expect/index.d.ts","../../../node_modules/.pnpm/@vitest+spy@2.1.9/node_modules/@vitest/spy/dist/index.d.ts","../../../node_modules/.pnpm/@vitest+mocker@2.1.9_msw@2.14.6_@types+node@22.19.19_typescript@5.9.3__vite@5.4.21_@types+node@22.19.19_/node_modules/@vitest/mocker/dist/types-dzoqtgin.d.ts","../../../node_modules/.pnpm/@vitest+mocker@2.1.9_msw@2.14.6_@types+node@22.19.19_typescript@5.9.3__vite@5.4.21_@types+node@22.19.19_/node_modules/@vitest/mocker/dist/index.d.ts","../../../node_modules/.pnpm/vitest@2.1.9_@types+node@22.19.19_msw@2.14.6_@types+node@22.19.19_typescript@5.9.3_/node_modules/vitest/dist/chunks/mocker.crtm890j.d.ts","../../../node_modules/.pnpm/vitest@2.1.9_@types+node@22.19.19_msw@2.14.6_@types+node@22.19.19_typescript@5.9.3_/node_modules/vitest/dist/chunks/suite.b2jumifp.d.ts","../../../node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/utils.d.ts","../../../node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/overloads.d.ts","../../../node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/branding.d.ts","../../../node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/messages.d.ts","../../../node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/index.d.ts","../../../node_modules/.pnpm/vitest@2.1.9_@types+node@22.19.19_msw@2.14.6_@types+node@22.19.19_typescript@5.9.3_/node_modules/vitest/dist/index.d.ts","../src/cmek.ts","../src/masterkey.ts","../src/cmek.test.ts","../src/index.ts","../../../node_modules/.pnpm/@types+better-sqlite3@7.6.13/node_modules/@types/better-sqlite3/index.d.ts","../../../node_modules/.pnpm/pg-types@2.2.0/node_modules/pg-types/index.d.ts","../../../node_modules/.pnpm/pg-protocol@1.14.0/node_modules/pg-protocol/dist/messages.d.ts","../../../node_modules/.pnpm/pg-protocol@1.14.0/node_modules/pg-protocol/dist/serializer.d.ts","../../../node_modules/.pnpm/pg-protocol@1.14.0/node_modules/pg-protocol/dist/parser.d.ts","../../../node_modules/.pnpm/pg-protocol@1.14.0/node_modules/pg-protocol/dist/index.d.ts","../../../node_modules/.pnpm/@types+pg@8.20.0/node_modules/@types/pg/lib/type-overrides.d.ts","../../../node_modules/.pnpm/@types+pg@8.20.0/node_modules/@types/pg/index.d.ts","../../../../node_modules/@types/readable-stream/index.d.ts"],"fileIdsList":[[80,129,146,147,179],[80,129,146,147],[80,126,127,129,146,147],[80,128,129,146,147],[129,146,147],[80,129,134,146,147,164],[80,129,130,135,140,146,147,149,161,172],[80,129,130,131,140,146,147,149],[75,76,77,80,129,146,147],[80,129,132,146,147,173],[80,129,133,134,141,146,147,150],[80,129,134,146,147,161,169],[80,129,135,137,140,146,147,149],[80,128,129,136,146,147],[80,129,137,138,146,147],[80,129,139,140,146,147],[80,128,129,140,146,147],[80,129,140,141,142,146,147,161,172],[80,129,140,141,142,146,147,156,161,164],[80,122,129,137,140,143,146,147,149,161,172],[80,129,140,141,143,144,146,147,149,161,169,172],[80,129,143,145,146,147,161,169,172],[78,79,80,81,82,83,84,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178],[80,129,140,146,147],[80,129,146,147,148,172],[80,129,137,140,146,147,149,161],[80,129,146,147,150],[80,129,146,147,151],[80,128,129,146,147,152],[80,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178],[80,129,146,147,154],[80,129,146,147,155],[80,129,140,146,147,156,157],[80,129,146,147,156,158,173,175],[80,129,141,146,147],[80,129,140,146,147,161,162,164],[80,129,146,147,163,164],[80,129,146,147,161,162],[80,129,146,147,164],[80,129,146,147,165],[80,126,129,146,147,161,166,172],[80,129,140,146,147,167,168],[80,129,146,147,167,168],[80,129,134,146,147,149,161,169],[80,129,146,147,170],[80,129,146,147,149,171],[80,129,143,146,147,155,172],[80,129,134,146,147,173],[80,129,146,147,161,174],[80,129,146,147,148,175],[80,129,146,147,176],[80,122,129,146,147],[80,122,129,140,142,146,147,152,161,164,172,174,175,177],[80,129,146,147,161,178],[80,129,140,146,147,161,169,179,250,251,254,255,256],[80,129,146,147,256],[66,67,70,80,129,146,147],[80,129,146,147,232],[80,129,146,147,235],[67,68,70,71,72,80,129,146,147],[67,80,129,146,147],[67,68,70,80,129,146,147],[67,68,80,129,146,147],[80,129,146,147,212],[62,80,129,146,147,212,213],[62,80,129,146,147,212],[62,69,80,129,146,147],[63,80,129,146,147],[62,63,64,66,80,129,146,147],[62,80,129,146,147],[80,129,146,147,239,240],[80,129,146,147,239,240,241,242],[80,129,146,147,239,241],[80,129,146,147,239],[80,129,146,147,179,251,252,253],[80,129,146,147,161,179,251],[80,129,146,147,203],[80,129,146,147,201,203],[80,129,146,147,192,200,201,202,204,206],[80,129,146,147,190],[80,129,146,147,193,198,203,206],[80,129,146,147,189,206],[80,129,146,147,193,194,197,198,199,206],[80,129,146,147,193,194,195,197,198,206],[80,129,146,147,190,191,192,193,194,198,199,200,202,203,204,206],[80,129,146,147,206],[80,129,146,147,188,190,191,192,193,194,195,197,198,199,200,201,202,203,204,205],[80,129,146,147,188,206],[80,129,146,147,193,195,196,198,199,206],[80,129,146,147,197,206],[80,129,146,147,198,199,203,206],[80,129,146,147,191,201],[80,129,146,147,181,210],[80,129,146,147,180,181],[65,80,129,146,147],[80,94,98,129,146,147,172],[80,94,129,146,147,161,172],[80,89,129,146,147],[80,91,94,129,146,147,169,172],[80,129,146,147,149,169],[80,89,129,146,147,179],[80,91,94,129,146,147,149,172],[80,86,87,90,93,129,140,146,147,161,172],[80,94,101,129,146,147],[80,86,92,129,146,147],[80,94,115,116,129,146,147],[80,90,94,129,146,147,164,172,179],[80,115,129,146,147,179],[80,88,89,129,146,147,179],[80,94,129,146,147],[80,88,89,90,91,92,93,94,95,96,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,116,117,118,119,120,121,129,146,147],[80,94,109,129,146,147],[80,94,101,102,129,146,147],[80,92,94,102,103,129,146,147],[80,93,129,146,147],[80,86,89,94,129,146,147],[80,94,98,102,103,129,146,147],[80,98,129,146,147],[80,92,94,97,129,146,147,172],[80,86,91,94,101,129,146,147],[80,129,146,147,161],[80,89,94,115,129,146,147,177,179],[80,129,146,147,217,218],[80,129,146,147,217],[80,129,146,147,211,217,218,230],[80,129,140,141,143,144,145,146,147,149,161,169,172,178,179,181,182,183,184,185,186,187,207,208,209,210],[80,129,146,147,183,184,185,186],[80,129,146,147,183,184,185],[80,129,146,147,183],[80,129,146,147,184],[80,129,146,147,181],[73,80,129,146,147,223,224,244],[62,73,80,129,146,147,214,215,244],[80,129,146,147,236],[62,67,73,74,80,129,141,146,147,161,211,214,216,219,220,221,222,225,226,230,231,244],[73,80,129,146,147,223,224,225,244],[80,129,146,147,211,227],[80,129,146,147,177,228],[73,74,80,129,146,147,214,216,219,244],[62,67,70,73,74,80,129,141,146,147,161,177,211,214,215,216,219,220,221,222,223,224,225,226,227,228,229,230,231,233,234,236,237,238,243,244],[80,129,134,141,146,147,150,151,244,245,246],[80,129,134,146,147],[80,129,146,147,245,246],[80,129,141,146,147,150,151,245],[80,129,146,147,161,179]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"df83c2a6c73228b625b0beb6669c7ee2a09c914637e2d35170723ad49c0f5cd4","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"d2e64a6f25013b099e83bfadb2c388d7bef3e8f3fdb25528225bbc841e7e7e3a","impliedFormat":99},{"version":"369ba5259e66ca8c7d35e3234f7a2a0863a770fdb8266505747c65cf346a0804","impliedFormat":99},{"version":"64d984f55025daf604f670b7dfd090ea765f2098aee871174ef2ee3e94479098","impliedFormat":99},{"version":"f147b6710441cf3ec3234adf63b0593ce5e8c9b692959d21d3babc8454bcf743","impliedFormat":99},{"version":"e96d5373a66c2cfbbc7e6642cf274055aa2c7ff6bd37be7480c66faf9804db6d","impliedFormat":99},{"version":"02bcdd7a76c5c1c485cbf05626d24c86ac8f9a1d8dc31f8924108bbaa4cf3ba9","impliedFormat":99},{"version":"c874ab6feac6e0fdf9142727c9a876065777a5392f14b0bbcf869b1e69eb46b5","impliedFormat":99},{"version":"7c553fc9e34773ddbaabe0fa1367d4b109101d0868a008f11042bee24b5a925d","impliedFormat":99},{"version":"9962ce696fbdce2421d883ca4b062a54f982496625437ae4d3633376c5ad4a80","impliedFormat":99},{"version":"e3ea467c4a7f743f3548c9ed61300591965b1d12c08c8bb9aaff8a002ba95fce","impliedFormat":99},{"version":"4c17183a07a63bea2653fbfc0a942b027160ddbee823024789a415f9589de327","impliedFormat":99},{"version":"3e2203c892297ea44b87470fde51b3d48cfe3eeb6901995de429539462894464","impliedFormat":99},{"version":"c84bf7a4abc5e7fdf45971a71b25b0e0d34ccd5e720a866dd78bb71d60d41a3f","impliedFormat":99},{"version":"6c7176368037af28cb72f2392010fa1cef295d6d6744bca8cfb54985f3a18c3e","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true,"impliedFormat":1},{"version":"437e20f2ba32abaeb7985e0afe0002de1917bc74e949ba585e49feba65da6ca1","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"98cffbf06d6bab333473c70a893770dbe990783904002c4f1a960447b4b53dca","affectsGlobalScope":true,"impliedFormat":1},{"version":"3af97acf03cc97de58a3a4bc91f8f616408099bc4233f6d0852e72a8ffb91ac9","affectsGlobalScope":true,"impliedFormat":1},{"version":"808069bba06b6768b62fd22429b53362e7af342da4a236ed2d2e1c89fcca3b4a","affectsGlobalScope":true,"impliedFormat":1},{"version":"1db0b7dca579049ca4193d034d835f6bfe73096c73663e5ef9a0b5779939f3d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"9798340ffb0d067d69b1ae5b32faa17ab31b82466a3fc00d8f2f2df0c8554aaa","affectsGlobalScope":true,"impliedFormat":1},{"version":"f26b11d8d8e4b8028f1c7d618b22274c892e4b0ef5b3678a8ccbad85419aef43","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e9c23ba78aabc2e0a27033f18737a6df754067731e69dc5f52823957d60a4b6","impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"763fe0f42b3d79b440a9b6e51e9ba3f3f91352469c1e4b3b67bfa4ff6352f3f4","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"7f182617db458e98fc18dfb272d40aa2fff3a353c44a89b2c0ccb3937709bfb5","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"e61be3f894b41b7baa1fbd6a66893f2579bfad01d208b4ff61daef21493ef0a8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"615ba88d0128ed16bf83ef8ccbb6aff05c3ee2db1cc0f89ab50a4939bfc1943f","impliedFormat":1},{"version":"a4d551dbf8746780194d550c88f26cf937caf8d56f102969a110cfaed4b06656","impliedFormat":1},{"version":"8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","impliedFormat":1},{"version":"317e63deeb21ac07f3992f5b50cdca8338f10acd4fbb7257ebf56735bf52ab00","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"b52476feb4a0cbcb25e5931b930fc73cb6643fb1a5060bf8a3dda0eeae5b4b68","affectsGlobalScope":true,"impliedFormat":1},{"version":"f9501cc13ce624c72b61f12b3963e84fad210fbdf0ffbc4590e08460a3f04eba","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7721c4f69f93c91360c26a0a84ee885997d748237ef78ef665b153e622b36c1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0fa06ada475b910e2106c98c68b10483dc8811d0c14a8a8dd36efb2672485b29","impliedFormat":1},{"version":"33e5e9aba62c3193d10d1d33ae1fa75c46a1171cf76fef750777377d53b0303f","impliedFormat":1},{"version":"2b06b93fd01bcd49d1a6bd1f9b65ddcae6480b9a86e9061634d6f8e354c1468f","impliedFormat":1},{"version":"6a0cd27e5dc2cfbe039e731cf879d12b0e2dded06d1b1dedad07f7712de0d7f4","affectsGlobalScope":true,"impliedFormat":1},{"version":"13f5c844119c43e51ce777c509267f14d6aaf31eafb2c2b002ca35584cd13b29","impliedFormat":1},{"version":"e60477649d6ad21542bd2dc7e3d9ff6853d0797ba9f689ba2f6653818999c264","impliedFormat":1},{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"4c829ab315f57c5442c6667b53769975acbf92003a66aef19bce151987675bd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"b2ade7657e2db96d18315694789eff2ddd3d8aea7215b181f8a0b303277cc579","impliedFormat":1},{"version":"9855e02d837744303391e5623a531734443a5f8e6e8755e018c41d63ad797db2","impliedFormat":1},{"version":"4d631b81fa2f07a0e63a9a143d6a82c25c5f051298651a9b69176ba28930756d","impliedFormat":1},{"version":"836a356aae992ff3c28a0212e3eabcb76dd4b0cc06bcb9607aeef560661b860d","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"41670ee38943d9cbb4924e436f56fc19ee94232bc96108562de1a734af20dc2c","affectsGlobalScope":true,"impliedFormat":1},{"version":"c906fb15bd2aabc9ed1e3f44eb6a8661199d6c320b3aa196b826121552cb3695","impliedFormat":1},{"version":"22295e8103f1d6d8ea4b5d6211e43421fe4564e34d0dd8e09e520e452d89e659","impliedFormat":1},{"version":"58647d85d0f722a1ce9de50955df60a7489f0593bf1a7015521efe901c06d770","impliedFormat":1},{"version":"73b5fa37db36eeac90c4d752e39586f1b57187400c4f5280fd05f16437287a45","impliedFormat":1},{"version":"a10f0e1854f3316d7ee437b79649e5a6ae3ae14ffe6322b02d4987071a95362e","impliedFormat":1},{"version":"e208f73ef6a980104304b0d2ca5f6bf1b85de6009d2c7e404028b875020fa8f2","impliedFormat":1},{"version":"d163b6bc2372b4f07260747cbc6c0a6405ab3fbcea3852305e98ac43ca59f5bc","impliedFormat":1},{"version":"e6fa9ad47c5f71ff733744a029d1dc472c618de53804eae08ffc243b936f87ff","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6f137d651076822d4fe884287e68fd61785a0d3d1fdb250a5059b691fa897db","impliedFormat":1},{"version":"24826ed94a78d5c64bd857570fdbd96229ad41b5cb654c08d75a9845e3ab7dde","impliedFormat":1},{"version":"8b479a130ccb62e98f11f136d3ac80f2984fdc07616516d29881f3061f2dd472","impliedFormat":1},{"version":"928af3d90454bf656a52a48679f199f64c1435247d6189d1caf4c68f2eaf921f","affectsGlobalScope":true,"impliedFormat":1},{"version":"bceb58df66ab8fb00170df20cd813978c5ab84be1d285710c4eb005d8e9d8efb","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","impliedFormat":1},{"version":"933921f0bb0ec12ef45d1062a1fc0f27635318f4d294e4d99de9a5493e618ca2","impliedFormat":1},{"version":"71a0f3ad612c123b57239a7749770017ecfe6b66411488000aba83e4546fde25","impliedFormat":1},{"version":"77fbe5eecb6fac4b6242bbf6eebfc43e98ce5ccba8fa44e0ef6a95c945ff4d98","impliedFormat":1},{"version":"4f9d8ca0c417b67b69eeb54c7ca1bedd7b56034bb9bfd27c5d4f3bc4692daca7","impliedFormat":1},{"version":"814118df420c4e38fe5ae1b9a3bafb6e9c2aa40838e528cde908381867be6466","impliedFormat":1},{"version":"a3fc63c0d7b031693f665f5494412ba4b551fe644ededccc0ab5922401079c95","impliedFormat":1},{"version":"80523c00b8544a2000ae0143e4a90a00b47f99823eb7926c1e03c494216fc363","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"45650f47bfb376c8a8ed39d4bcda5902ab899a3150029684ee4c10676d9fbaee","impliedFormat":1},{"version":"746911b62b329587939560deb5c036aca48aece03147b021fa680223255d5183","affectsGlobalScope":true,"impliedFormat":1},{"version":"18fd40412d102c5564136f29735e5d1c3b455b8a37f920da79561f1fde068208","impliedFormat":1},{"version":"c8d3e5a18ba35629954e48c4cc8f11dc88224650067a172685c736b27a34a4dc","impliedFormat":1},{"version":"f0be1b8078cd549d91f37c30c222c2a187ac1cf981d994fb476a1adc61387b14","affectsGlobalScope":true,"impliedFormat":1},{"version":"0aaed1d72199b01234152f7a60046bc947f1f37d78d182e9ae09c4289e06a592","impliedFormat":1},{"version":"2b55d426ff2b9087485e52ac4bc7cfafe1dc420fc76dad926cd46526567c501a","impliedFormat":1},{"version":"66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","impliedFormat":1},{"version":"7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4","impliedFormat":1},{"version":"5b7aa3c4c1a5d81b411e8cb302b45507fea9358d3569196b27eb1a27ae3a90ef","affectsGlobalScope":true,"impliedFormat":1},{"version":"5987a903da92c7462e0b35704ce7da94d7fdc4b89a984871c0e2b87a8aae9e69","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea08a0345023ade2b47fbff5a76d0d0ed8bff10bc9d22b83f40858a8e941501c","impliedFormat":1},{"version":"47613031a5a31510831304405af561b0ffaedb734437c595256bb61a90f9311b","impliedFormat":1},{"version":"ae062ce7d9510060c5d7e7952ae379224fb3f8f2dd74e88959878af2057c143b","impliedFormat":1},{"version":"8a1a0d0a4a06a8d278947fcb66bf684f117bf147f89b06e50662d79a53be3e9f","affectsGlobalScope":true,"impliedFormat":1},{"version":"358765d5ea8afd285d4fd1532e78b88273f18cb3f87403a9b16fef61ac9fdcfe","impliedFormat":1},{"version":"9f55299850d4f0921e79b6bf344b47c420ce0f507b9dcf593e532b09ea7eeea1","impliedFormat":1},{"version":"151ff381ef9ff8da2da9b9663ebf657eac35c4c9a19183420c05728f31a6761d","impliedFormat":1},{"version":"ee70b8037ecdf0de6c04f35277f253663a536d7e38f1539d270e4e916d225a3f","affectsGlobalScope":true,"impliedFormat":1},{"version":"a660aa95476042d3fdcc1343cf6bb8fdf24772d31712b1db321c5a4dcc325434","impliedFormat":1},{"version":"282f98006ed7fa9bb2cd9bdbe2524595cfc4bcd58a0bb3232e4519f2138df811","impliedFormat":1},{"version":"6222e987b58abfe92597e1273ad7233626285bc2d78409d4a7b113d81a83496b","impliedFormat":1},{"version":"cbe726263ae9a7bf32352380f7e8ab66ee25b3457137e316929269c19e18a2be","impliedFormat":1},{"version":"8b96046bf5fb0a815cba6b0880d9f97b7f3a93cf187e8dcfe8e2792e97f38f87","impliedFormat":99},{"version":"bacf2c84cf448b2cd02c717ad46c3d7fd530e0c91282888c923ad64810a4d511","affectsGlobalScope":true,"impliedFormat":1},{"version":"402e5c534fb2b85fa771170595db3ac0dd532112c8fa44fc23f233bc6967488b","impliedFormat":1},{"version":"52dcc257df5119fb66d864625112ce5033ac51a4c2afe376a0b299d2f7f76e4a","impliedFormat":1},{"version":"e5bab5f871ef708d52d47b3e5d0aa72a08ee7a152f33931d9a60809711a2a9a3","impliedFormat":1},{"version":"e16dc2a81595736024a206c7d5c8a39bfe2e6039208ef29981d0d95434ba8fcf","impliedFormat":1},{"version":"cc4a4903fb698ca1d961d4c10dce658aa3a479faf40509d526f122b044eaf6a4","impliedFormat":1},{"version":"19ee8416e6473ed6c7adb868fa796b5653cf0fa2a337658e677eaa0d134388c3","impliedFormat":1},{"version":"1328ab4e442614b28cdb3d4b414cf68325c0da0dca07287a338d0654b7a00261","impliedFormat":1},{"version":"a039dc21f045919f3cbee2ec13812cc6cc3eebc99dae4be00973230f468d19a6","impliedFormat":1},{"version":"3fbe57af01460e49dcd29df55d6931e1672bc6f1be0fb073d11410bc16f9037d","impliedFormat":1},{"version":"f760be449e8562ec5c09bb5187e8e1eabf3c113c0c58cddda53ef8c69f3e2131","impliedFormat":1},{"version":"44325ed13294fce6ab825b82947bbeed2611db7dad9d9135260192f375e5a189","impliedFormat":1},{"version":"e392e8fb5b514eafc585601c1d781485aa6dd6a320e75daf1064a4c6918a1b45","impliedFormat":1},{"version":"46e4a36e8ddbdfb4e7330e11c81c970dc8b218611df9183d39c41c5f8c653b55","impliedFormat":1},{"version":"370bde134aa8c2abc926d0e99d3a4d5d5dba65c6ee65459137e4f02670cbf841","impliedFormat":1},{"version":"6332f565867cf4a740a70e30f31cefba37ef7cebcf74f22eab8d744fde6d193e","impliedFormat":1},{"version":"2977b7884aedc895a1d0c9c210c7cf3272c29d6959a08a6fa3ff71e0aff08175","impliedFormat":1},{"version":"17f2922d41ddd032830a91371c948cd9ce903b35c95adca72271a54584f19b0b","impliedFormat":1},{"version":"3eed76ede2a1a14d7c9bb0a642041282dcc264811139d3dd275c9fe14efc9840","impliedFormat":1},{"version":"e3cf0611709328b449ec13f8c436712d62003620ce480139fae46ce001c2ee9f","impliedFormat":1},{"version":"8d369483f0c2b9ee388129cfdb6a43bc8112b377e86a41884bd06e19ce04f4c1","impliedFormat":99},{"version":"82e687ebd99518bc63ea04b0c3810fb6e50aa6942decd0ca6f7a56d9b9a212a6","impliedFormat":99},{"version":"7f698624bbbb060ece7c0e51b7236520ebada74b747d7523c7df376453ed6fea","impliedFormat":1},{"version":"8f07f2b6514744ac96e51d7cb8518c0f4de319471237ea10cf688b8d0e9d0225","impliedFormat":1},{"version":"257b83faa134d971c738a6b9e4c47e59bb7b23274719d92197580dd662bfafc3","impliedFormat":99},{"version":"e01ea380015ed698c3c0e2ccd0db72f3fc3ef1abc4519f122aa1c1a8d419a505","impliedFormat":99},{"version":"5ada1f8a9580c0f7478fe03ae3e07e958f0b79bdfb9dd50eeb98c1324f40011b","impliedFormat":99},{"version":"a8301dc90b4bd9fba333226ee0f1681aeeff1bd90233a8f647e687cb4b7d3521","impliedFormat":99},{"version":"e3225dc0bec183183509d290f641786245e6652bc3dce755f7ef404060693c35","impliedFormat":99},{"version":"09a03870ed8c55d7453bc9ad684df88965f2f770f987481ca71b8a09be5205bc","impliedFormat":99},{"version":"e6233e1c976265e85aa8ad76c3881febe6264cb06ae3136f0257e1eab4a6cc5a","impliedFormat":99},{"version":"2cdd50ddc49e2d608ee848fc4ab0db9a2716624fabb4209c7c683d87e54d79c5","impliedFormat":99},{"version":"e431d664338b8470abb1750d699c7dfcebb1a25434559ef85bb96f1e82de5972","impliedFormat":99},{"version":"2c4254139d037c3caca66ce291c1308c1b5092cfcb151eb25980db932dd3b01a","impliedFormat":99},{"version":"970ae00ed018cb96352dc3f37355ef9c2d9f8aa94d7174ccd6d0ed855e462097","impliedFormat":99},{"version":"d2f8dee457ef7660b604226d471d55d927c3051766bdd80353553837492635c3","impliedFormat":99},{"version":"110a503289a2ef76141ffff3ffceb9a1c3662c32748eb9f6777a2bd0866d6fb1","impliedFormat":99},{"version":"69bf2422313487956e4dacf049f30cb91b34968912058d244cb19e4baa24da97","impliedFormat":99},{"version":"310e6b62c493ce991624169a1c1904015769d947be88dc67e00adc7ebebcfa87","impliedFormat":99},{"version":"62fefda288160bf6e435b21cc03d3fbac11193d8d3bd0e82d86623cca7691c29","impliedFormat":99},{"version":"fcc46a8bcbf9bef21023bba1995160a25f0bc590ca3563ec44c315b4f4c1b18a","impliedFormat":99},{"version":"0309a01650023994ed96edbd675ea4fdc3779a823ce716ad876cc77afb792b62","impliedFormat":99},{"version":"f13d7beeea58e219daef3a40e0dc4f2bd7d9581ac04cedec236102a12dfd2090","impliedFormat":99},{"version":"669573548930fb7d0a0761b827e203dc623581e21febf0be80fb02414f217d74","impliedFormat":99},{"version":"48c411efce1848d1ed55de41d7deb93cbf7c04080912fd87aa517ed25ef42639","affectsGlobalScope":true,"impliedFormat":1},{"version":"a094636c05f3e75cb072684dd42cd25a4c1324bec4a866706c85c04cecd49613","affectsGlobalScope":true,"impliedFormat":99},{"version":"fe2d63fcfdde197391b6b70daf7be8c02a60afa90754a5f4a04bdc367f62793d","impliedFormat":99},{"version":"9a3e2c85ec1ab7a0874a19814cc73c691b716282cb727914093089c5a8475955","impliedFormat":99},{"version":"cbdc781d2429935c9c42acd680f2a53a9f633e8de03290ec6ea818e4f7bff19a","impliedFormat":99},{"version":"9f6d9f5dd710922f82f69abf9a324e28122b5f31ae6f6ce78427716db30a377e","impliedFormat":99},{"version":"ac2414a284bdecfd6ab7b87578744ab056cd04dd574b17853cd76830ef5b72f2","impliedFormat":99},{"version":"c3f921bbc9d2e65bd503a56fbc66da910e68467baedb0b9db0cc939e1876c0d7","impliedFormat":99},{"version":"c30a41267fc04c6518b17e55dcb2b810f267af4314b0b6d7df1c33a76ce1b330","impliedFormat":1},{"version":"72422d0bac4076912385d0c10911b82e4694fc106e2d70added091f88f0824ba","impliedFormat":1},{"version":"da251b82c25bee1d93f9fd80c5a61d945da4f708ca21285541d7aff83ecb8200","impliedFormat":1},{"version":"64db14db2bf37ac089766fdb3c7e1160fabc10e9929bc2deeede7237e4419fc8","impliedFormat":1},{"version":"98b94085c9f78eba36d3d2314affe973e8994f99864b8708122750788825c771","impliedFormat":1},{"version":"0cc99fbb161d78729d71fad66c6c363e3095862d6277160f29fa960744b785c6","affectsGlobalScope":true,"impliedFormat":99},{"version":"3e56ab7f1fc16e4f7354a981ea735e977e9cdbdade619cd669da79ac3761020e","signature":"fa9ef89eeb64284df90e88bc8c5f88ab6f5f0cf4f8ddfc8e1a13fc3589185b6c","impliedFormat":99},{"version":"9240d0ca037c53c1437484d3ed5d4c01a95ed76c3d31e5809eead9e64ed1ed45","signature":"c5eddbe74f44ec1ecb0632951cabd044d1e3cc278f3a0ee2031b22f862470ad1","impliedFormat":99},{"version":"dd7dbf2cd32a9fa2de3ab8958e06825aadb2962f5e395b556e7ee91f362cbb74","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":99},{"version":"ddfb3437c9f5d5b9ac7083603704b50227e80192a499258ce012634ece4a7d5e","signature":"f4f52b64a0b080cc87ebc4783d920d295fc359b663b6e1362dd2c43a4fa1943b","impliedFormat":99},{"version":"c2a6a737189ced24ffe0634e9239b087e4c26378d0490f95141b9b9b042b746c","impliedFormat":1},{"version":"f60e3e3060207ac982da13363181fd7ee4beecc19a7c569f0d6bb034331066c2","impliedFormat":1},{"version":"17230b34bb564a3a2e36f9d3985372ccab4ad1722df2c43f7c5c2b553f68e5db","impliedFormat":1},{"version":"dcb41cc4b671f5f85d3754e68dfde7824686a8adbb4c690cb259c1501cb868e1","impliedFormat":1},{"version":"21ac4cf3f8d8c6e1201cb31f600be708c9a37867fc5c73b7ccf80560fae591c8","impliedFormat":1},{"version":"0dfe35191a04e8f9dc7caeb9f52f2ee07402736563d12cbccd15fb5f31ac877f","impliedFormat":1},{"version":"798367363a3274220cbed839b883fe2f52ba7197b25e8cb2ac59c1e1fd8af6b7","impliedFormat":1},{"version":"2636a309ed87d6876728d9aca846a76b372cf2a21a4fdf9940a82a2dd86687d0","impliedFormat":1},{"version":"82428329db2b05aba6784395a429504ebca24f5d4b9506f779b964cf8c0fd58e","affectsGlobalScope":true,"impliedFormat":1}],"root":[[245,248]],"options":{"composite":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"module":199,"noImplicitOverride":true,"noUncheckedIndexedAccess":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":9,"tsBuildInfoFile":"./.tsbuildinfo","verbatimModuleSyntax":false},"referencedMap":[[249,1],[180,2],[126,3],[127,3],[128,4],[80,5],[129,6],[130,7],[131,8],[75,2],[78,9],[76,2],[77,2],[132,10],[133,11],[134,12],[135,13],[136,14],[137,15],[138,15],[139,16],[140,17],[141,18],[142,19],[81,2],[79,2],[143,20],[144,21],[145,22],[179,23],[146,24],[147,2],[148,25],[149,26],[150,27],[151,28],[152,29],[153,30],[154,31],[155,32],[156,33],[157,33],[158,34],[159,2],[160,35],[161,36],[163,37],[162,38],[164,39],[165,40],[166,41],[167,42],[168,43],[169,44],[170,45],[171,46],[172,47],[173,48],[174,49],[175,50],[176,51],[82,2],[83,2],[84,2],[123,52],[124,2],[125,2],[177,53],[178,54],[256,55],[255,56],[231,2],[232,57],[233,58],[236,59],[235,2],[62,2],[73,60],[68,61],[71,62],[223,63],[212,2],[215,64],[214,65],[226,65],[213,66],[234,2],[70,67],[72,67],[64,68],[67,69],[220,68],[69,70],[63,2],[85,2],[187,2],[241,71],[243,72],[242,73],[240,74],[239,2],[254,75],[251,1],[253,76],[252,1],[250,2],[204,77],[202,78],[203,79],[191,80],[192,78],[199,81],[190,82],[195,83],[205,2],[196,84],[201,85],[207,86],[206,87],[189,88],[197,89],[198,90],[193,91],[200,77],[194,92],[182,93],[181,94],[188,2],[224,2],[65,2],[66,95],[60,2],[61,2],[12,2],[11,2],[2,2],[13,2],[14,2],[15,2],[16,2],[17,2],[18,2],[19,2],[20,2],[3,2],[21,2],[22,2],[4,2],[23,2],[27,2],[24,2],[25,2],[26,2],[28,2],[29,2],[30,2],[5,2],[31,2],[32,2],[33,2],[34,2],[6,2],[38,2],[35,2],[36,2],[37,2],[39,2],[7,2],[40,2],[45,2],[46,2],[41,2],[42,2],[43,2],[44,2],[8,2],[50,2],[47,2],[48,2],[49,2],[51,2],[9,2],[52,2],[53,2],[54,2],[56,2],[55,2],[57,2],[58,2],[10,2],[59,2],[1,2],[101,96],[111,97],[100,96],[121,98],[92,99],[91,100],[120,1],[114,101],[119,102],[94,103],[108,104],[93,105],[117,106],[89,107],[88,1],[118,108],[90,109],[95,110],[96,2],[99,110],[86,2],[122,111],[112,112],[103,113],[104,114],[106,115],[102,116],[105,117],[115,1],[97,118],[98,119],[107,120],[87,121],[110,112],[109,110],[113,2],[116,122],[221,123],[218,124],[219,123],[222,125],[217,2],[211,126],[208,127],[186,128],[184,129],[183,2],[185,130],[209,2],[210,131],[225,132],[216,133],[74,2],[237,134],[227,135],[238,136],[230,137],[229,138],[228,139],[244,140],[247,141],[245,142],[248,143],[246,144],[257,145]],"latestChangedDtsFile":"./index.d.ts","version":"5.9.3"}
package/dist/cmek.d.ts ADDED
@@ -0,0 +1,29 @@
1
+ export declare const CMEK_VERSION = 1;
2
+ export declare const CMEK_ALG = "AES-256-GCM";
3
+ export interface CmekEnvelope {
4
+ v: number;
5
+ alg: string;
6
+ /** base64 — present only for passphrase-derived KEKs (KDF salt). */
7
+ salt?: string;
8
+ wrapNonce: string;
9
+ wrappedDek: string;
10
+ wrapTag: string;
11
+ nonce: string;
12
+ ciphertext: string;
13
+ tag: string;
14
+ }
15
+ export declare class CmekError extends Error {
16
+ constructor(message: string);
17
+ }
18
+ /** Derive a 32-byte KEK from a passphrase + salt (scrypt). */
19
+ export declare function deriveKek(passphrase: string, salt: Buffer): Buffer;
20
+ export declare function newSalt(): Buffer;
21
+ /** Encrypt plaintext into a CMEK envelope. `salt` is stored only for record-keeping. */
22
+ export declare function encrypt(plaintext: string | Buffer, kek: Buffer, salt?: Buffer): CmekEnvelope;
23
+ export declare function decrypt(env: CmekEnvelope, kek: Buffer): Buffer;
24
+ export declare function decryptString(env: CmekEnvelope, kek: Buffer): string;
25
+ export declare function serializeEnvelope(env: CmekEnvelope): string;
26
+ export declare function parseEnvelope(text: string): CmekEnvelope;
27
+ /** Constant-time compare (for any KEK fingerprinting needs). */
28
+ export declare function safeEqual(a: Buffer, b: Buffer): boolean;
29
+ //# sourceMappingURL=cmek.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cmek.d.ts","sourceRoot":"","sources":["../src/cmek.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,YAAY,IAAI,CAAC;AAC9B,eAAO,MAAM,QAAQ,gBAAgB,CAAC;AAGtC,MAAM,WAAW,YAAY;IAC3B,CAAC,EAAE,MAAM,CAAC;IACV,GAAG,EAAE,MAAM,CAAC;IACZ,oEAAoE;IACpE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,qBAAa,SAAU,SAAQ,KAAK;gBACtB,OAAO,EAAE,MAAM;CAI5B;AAED,8DAA8D;AAC9D,wBAAgB,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAElE;AAED,wBAAgB,OAAO,IAAI,MAAM,CAEhC;AAMD,wFAAwF;AACxF,wBAAgB,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,YAAY,CA8B5F;AAED,wBAAgB,OAAO,CAAC,GAAG,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAwB9D;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAEpE;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,YAAY,GAAG,MAAM,CAE3D;AACD,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAMxD;AAED,gEAAgE;AAChE,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAEvD"}
package/dist/cmek.js ADDED
@@ -0,0 +1,109 @@
1
+ /**
2
+ * Model-3 CMEK envelope encryption (S-N8). The cloud stores ONLY ciphertext
3
+ * envelopes; decryption happens locally with a customer master key (KEK).
4
+ *
5
+ * Scheme (S-N8-1/2/4):
6
+ * - per-item DEK = 32 random bytes; content encrypted AES-256-GCM(DEK, nonce).
7
+ * - DEK wrapped AES-256-GCM(KEK, wrapNonce). KEK from passphrase (scrypt) or a
8
+ * 32-byte key file. 96-bit random nonce per encryption (never reused). Auth
9
+ * tags verified on decrypt (tamper → throw). AAD binds version+alg.
10
+ *
11
+ * NOTE (deviation, as N3): KDF is scrypt (N=2^15), not Argon2id — avoids a
12
+ * native dep; flagged for security re-review.
13
+ */
14
+ import { randomBytes, createCipheriv, createDecipheriv, scryptSync, timingSafeEqual, } from 'node:crypto';
15
+ export const CMEK_VERSION = 1;
16
+ export const CMEK_ALG = 'AES-256-GCM';
17
+ const SCRYPT = { N: 1 << 15, r: 8, p: 1, maxmem: 96 * 1024 * 1024 };
18
+ export class CmekError extends Error {
19
+ constructor(message) {
20
+ super(message);
21
+ this.name = 'CmekError';
22
+ }
23
+ }
24
+ /** Derive a 32-byte KEK from a passphrase + salt (scrypt). */
25
+ export function deriveKek(passphrase, salt) {
26
+ return scryptSync(passphrase, salt, 32, SCRYPT);
27
+ }
28
+ export function newSalt() {
29
+ return randomBytes(16);
30
+ }
31
+ function aad() {
32
+ return Buffer.from(`${CMEK_VERSION}:${CMEK_ALG}`, 'utf8');
33
+ }
34
+ /** Encrypt plaintext into a CMEK envelope. `salt` is stored only for record-keeping. */
35
+ export function encrypt(plaintext, kek, salt) {
36
+ if (kek.length !== 32)
37
+ throw new CmekError('KEK must be 32 bytes');
38
+ const dek = randomBytes(32);
39
+ const data = typeof plaintext === 'string' ? Buffer.from(plaintext, 'utf8') : plaintext;
40
+ // content encryption
41
+ const nonce = randomBytes(12);
42
+ const cc = createCipheriv('aes-256-gcm', dek, nonce);
43
+ cc.setAAD(aad());
44
+ const ciphertext = Buffer.concat([cc.update(data), cc.final()]);
45
+ const tag = cc.getAuthTag();
46
+ // wrap DEK under KEK
47
+ const wrapNonce = randomBytes(12);
48
+ const wc = createCipheriv('aes-256-gcm', kek, wrapNonce);
49
+ wc.setAAD(aad());
50
+ const wrappedDek = Buffer.concat([wc.update(dek), wc.final()]);
51
+ const wrapTag = wc.getAuthTag();
52
+ return {
53
+ v: CMEK_VERSION,
54
+ alg: CMEK_ALG,
55
+ salt: salt?.toString('base64'),
56
+ wrapNonce: wrapNonce.toString('base64'),
57
+ wrappedDek: wrappedDek.toString('base64'),
58
+ wrapTag: wrapTag.toString('base64'),
59
+ nonce: nonce.toString('base64'),
60
+ ciphertext: ciphertext.toString('base64'),
61
+ tag: tag.toString('base64'),
62
+ };
63
+ }
64
+ export function decrypt(env, kek) {
65
+ if (kek.length !== 32)
66
+ throw new CmekError('KEK must be 32 bytes');
67
+ if (env.v !== CMEK_VERSION || env.alg !== CMEK_ALG) {
68
+ throw new CmekError(`Unsupported envelope (v=${env.v}, alg=${env.alg})`);
69
+ }
70
+ // unwrap DEK
71
+ const wc = createDecipheriv('aes-256-gcm', kek, Buffer.from(env.wrapNonce, 'base64'));
72
+ wc.setAAD(aad());
73
+ wc.setAuthTag(Buffer.from(env.wrapTag, 'base64'));
74
+ let dek;
75
+ try {
76
+ dek = Buffer.concat([wc.update(Buffer.from(env.wrappedDek, 'base64')), wc.final()]);
77
+ }
78
+ catch {
79
+ throw new CmekError('Failed to unwrap DEK (wrong master key or tampered envelope)');
80
+ }
81
+ // decrypt content
82
+ const cc = createDecipheriv('aes-256-gcm', dek, Buffer.from(env.nonce, 'base64'));
83
+ cc.setAAD(aad());
84
+ cc.setAuthTag(Buffer.from(env.tag, 'base64'));
85
+ try {
86
+ return Buffer.concat([cc.update(Buffer.from(env.ciphertext, 'base64')), cc.final()]);
87
+ }
88
+ catch {
89
+ throw new CmekError('Failed to decrypt content (tampered ciphertext)');
90
+ }
91
+ }
92
+ export function decryptString(env, kek) {
93
+ return decrypt(env, kek).toString('utf8');
94
+ }
95
+ export function serializeEnvelope(env) {
96
+ return JSON.stringify(env);
97
+ }
98
+ export function parseEnvelope(text) {
99
+ const e = JSON.parse(text);
100
+ if (!e || typeof e !== 'object' || !e.ciphertext || !e.wrappedDek) {
101
+ throw new CmekError('Not a valid CMEK envelope');
102
+ }
103
+ return e;
104
+ }
105
+ /** Constant-time compare (for any KEK fingerprinting needs). */
106
+ export function safeEqual(a, b) {
107
+ return a.length === b.length && timingSafeEqual(a, b);
108
+ }
109
+ //# sourceMappingURL=cmek.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cmek.js","sourceRoot":"","sources":["../src/cmek.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EACL,WAAW,EACX,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,eAAe,GAChB,MAAM,aAAa,CAAC;AAErB,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC;AAC9B,MAAM,CAAC,MAAM,QAAQ,GAAG,aAAa,CAAC;AACtC,MAAM,MAAM,GAAG,EAAE,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,GAAG,IAAI,GAAG,IAAI,EAAW,CAAC;AAe7E,MAAM,OAAO,SA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AC;AAED,MAAM,UAAU,aAAa,CAAC,GAAiB,EAAE,GAAW;IAC1D,OAAO,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC5C,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,GAAiB;IACjD,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;AAC7B,CAAC;AACD,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAiB,CAAC;IAC3C,IAAI,CAAC,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC;QAClE,MAAM,IAAI,SAAS,CAAC,2BAA2B,CAAC,CAAC;IACnD,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AAED,gEAAgE;AAChE,MAAM,UAAU,SAAS,CAAC,CAAS,EAAE,CAAS;IAC5C,OAAO,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACxD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=cmek.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cmek.test.d.ts","sourceRoot":"","sources":["../src/cmek.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,94 @@
1
+ import { describe, it, expect, beforeEach, afterEach } from 'vitest';
2
+ import { mkdtempSync, rmSync, writeFileSync, statSync } from 'node:fs';
3
+ import { platform, tmpdir } from 'node:os';
4
+ import { join } from 'node:path';
5
+ import { randomBytes } from 'node:crypto';
6
+ import { deriveKek, newSalt, encrypt, decrypt, decryptString, parseEnvelope, serializeEnvelope, CmekError, } from './cmek.js';
7
+ import { initCmek, resolveKek, isCmekEnabled, cmekStatus } from './masterkey.js';
8
+ const PLAINTEXT = 'Top secret: customer-managed key content — never leaves the laptop in the clear.';
9
+ describe('CMEK envelope', () => {
10
+ const kek = randomBytes(32);
11
+ it('round-trips plaintext', () => {
12
+ const env = encrypt(PLAINTEXT, kek);
13
+ expect(decryptString(env, kek)).toBe(PLAINTEXT);
14
+ });
15
+ it('envelope contains NO plaintext (S-N8-3 boundary)', () => {
16
+ const env = encrypt(PLAINTEXT, kek);
17
+ const blob = serializeEnvelope(env);
18
+ expect(blob).not.toContain('Top secret');
19
+ expect(blob).not.toContain('laptop');
20
+ });
21
+ it('uses a fresh nonce per encryption (S-N8-1)', () => {
22
+ const a = encrypt(PLAINTEXT, kek);
23
+ const b = encrypt(PLAINTEXT, kek);
24
+ expect(a.nonce).not.toBe(b.nonce);
25
+ expect(a.ciphertext).not.toBe(b.ciphertext);
26
+ expect(a.wrapNonce).not.toBe(b.wrapNonce);
27
+ });
28
+ it('rejects a wrong master key', () => {
29
+ const env = encrypt(PLAINTEXT, kek);
30
+ expect(() => decrypt(env, randomBytes(32))).toThrow(CmekError);
31
+ });
32
+ it('detects tampered ciphertext (S-N8-4)', () => {
33
+ const env = encrypt(PLAINTEXT, kek);
34
+ const ct = Buffer.from(env.ciphertext, 'base64');
35
+ ct[0] = ct[0] ^ 0xff;
36
+ env.ciphertext = ct.toString('base64');
37
+ expect(() => decrypt(env, kek)).toThrow(CmekError);
38
+ });
39
+ it('rejects a non-32-byte KEK', () => {
40
+ expect(() => encrypt(PLAINTEXT, randomBytes(16))).toThrow(CmekError);
41
+ });
42
+ it('deriveKek is deterministic for the same passphrase+salt', () => {
43
+ const salt = newSalt();
44
+ expect(deriveKek('hunter2', salt).equals(deriveKek('hunter2', salt))).toBe(true);
45
+ expect(deriveKek('hunter2', salt).equals(deriveKek('other', salt))).toBe(false);
46
+ });
47
+ it('parseEnvelope rejects non-envelopes', () => {
48
+ expect(() => parseEnvelope('{"foo":1}')).toThrow(CmekError);
49
+ });
50
+ });
51
+ describe('CMEK master key (per profile)', () => {
52
+ let dir;
53
+ let saved;
54
+ beforeEach(() => {
55
+ saved = process.env.KNOWZ_CONFIG_DIR;
56
+ dir = mkdtempSync(join(tmpdir(), 'knowz-cmek-'));
57
+ process.env.KNOWZ_CONFIG_DIR = dir;
58
+ });
59
+ afterEach(() => {
60
+ rmSync(dir, { recursive: true, force: true });
61
+ if (saved === undefined)
62
+ delete process.env.KNOWZ_CONFIG_DIR;
63
+ else
64
+ process.env.KNOWZ_CONFIG_DIR = saved;
65
+ });
66
+ it('passphrase mode: init writes 0600 config, resolveKek derives a 32-byte key', () => {
67
+ expect(isCmekEnabled('dev')).toBe(false);
68
+ initCmek('dev');
69
+ expect(isCmekEnabled('dev')).toBe(true);
70
+ expect(cmekStatus('dev')).toMatchObject({ enabled: true, mode: 'passphrase' });
71
+ const cfgPath = join(dir, 'cmek', 'dev.json');
72
+ if (platform() !== 'win32') {
73
+ expect(statSync(cfgPath).mode & 0o777).toBe(0o600);
74
+ }
75
+ const kek = resolveKek('dev', { passphrase: 'pw' });
76
+ expect(kek.length).toBe(32);
77
+ // round-trip end to end with a resolved KEK
78
+ const env = encrypt(PLAINTEXT, kek);
79
+ expect(decryptString(env, resolveKek('dev', { passphrase: 'pw' }))).toBe(PLAINTEXT);
80
+ });
81
+ it('keyfile mode: reads a 64-hex key file', () => {
82
+ const kf = join(dir, 'master.key');
83
+ writeFileSync(kf, randomBytes(32).toString('hex'));
84
+ initCmek('dev', { keyfile: kf });
85
+ expect(cmekStatus('dev')).toMatchObject({ enabled: true, mode: 'keyfile' });
86
+ expect(resolveKek('dev').length).toBe(32);
87
+ });
88
+ it('resolveKek throws without a passphrase', () => {
89
+ initCmek('dev');
90
+ delete process.env.KNOWZ_CMEK_PASSPHRASE;
91
+ expect(() => resolveKek('dev')).toThrow(CmekError);
92
+ });
93
+ });
94
+ //# sourceMappingURL=cmek.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cmek.test.js","sourceRoot":"","sources":["../src/cmek.test.ts"],"names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CAAC,GAAG,EAAE,UAAU,CAAC,KAAK,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACtF,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uCAAuC,EAAE,GAAG,EAAE;QAC/C,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;QACnC,aAAa,CAAC,EAAE,EAAE,WAAW,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;QACnD,QAAQ,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;QACjC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC;QAC5E,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wCAAwC,EAAE,GAAG,EAAE;QAChD,QAAQ,CAAC,KAAK,CAAC,CAAC;QAChB,OAAO,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC;QACzC,MAAM,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const NODE_ID: "FEAT_KnowzCmekCrypto";
2
+ export { CMEK_VERSION, CMEK_ALG, CmekError, deriveKek, newSalt, encrypt, decrypt, decryptString, serializeEnvelope, parseEnvelope, safeEqual, type CmekEnvelope, } from './cmek.js';
3
+ export { initCmek, resolveKek, isCmekEnabled, readCmekConfig, cmekConfigPath, cmekStatus, keyFilePerms, type CmekMode, type CmekConfig, } from './masterkey.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,EAAG,sBAA+B,CAAC;AAEvD,OAAO,EACL,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,SAAS,EACT,OAAO,EACP,OAAO,EACP,OAAO,EACP,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,SAAS,EACT,KAAK,YAAY,GAClB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,QAAQ,EACR,UAAU,EACV,aAAa,EACb,cAAc,EACd,cAAc,EACd,UAAU,EACV,YAAY,EACZ,KAAK,QAAQ,EACb,KAAK,UAAU,GAChB,MAAM,gBAAgB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+ export const NODE_ID = 'FEAT_KnowzCmekCrypto';
2
+ export { CMEK_VERSION, CMEK_ALG, CmekError, deriveKek, newSalt, encrypt, decrypt, decryptString, serializeEnvelope, parseEnvelope, safeEqual, } from './cmek.js';
3
+ export { initCmek, resolveKek, isCmekEnabled, readCmekConfig, cmekConfigPath, cmekStatus, keyFilePerms, } from './masterkey.js';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,sBAA+B,CAAC;AAEvD,OAAO,EACL,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,SAAS,EACT,OAAO,EACP,OAAO,EACP,OAAO,EACP,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,SAAS,GAEV,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,QAAQ,EACR,UAAU,EACV,aAAa,EACb,cAAc,EACd,cAAc,EACd,UAAU,EACV,YAAY,GAGb,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,25 @@
1
+ export type CmekMode = 'passphrase' | 'keyfile';
2
+ export interface CmekConfig {
3
+ v: 1;
4
+ mode: CmekMode;
5
+ salt?: string;
6
+ keyfile?: string;
7
+ }
8
+ export declare function cmekConfigPath(profile: string): string;
9
+ export declare function isCmekEnabled(profile: string): boolean;
10
+ export declare function readCmekConfig(profile: string): CmekConfig | undefined;
11
+ /** Initialize CMEK for a profile. Passphrase mode mints a salt; keyfile mode records the path. */
12
+ export declare function initCmek(profile: string, opts?: {
13
+ keyfile?: string;
14
+ }): CmekConfig;
15
+ /** Resolve the 32-byte KEK for a profile (passphrase env/arg or key file). */
16
+ export declare function resolveKek(profile: string, opts?: {
17
+ passphrase?: string;
18
+ }): Buffer;
19
+ export declare function cmekStatus(profile: string): {
20
+ enabled: boolean;
21
+ mode?: CmekMode;
22
+ keyfile?: string;
23
+ };
24
+ export declare function keyFilePerms(path: string): number;
25
+ //# sourceMappingURL=masterkey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"masterkey.d.ts","sourceRoot":"","sources":["../src/masterkey.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,QAAQ,GAAG,YAAY,GAAG,SAAS,CAAC;AAChD,MAAM,WAAW,UAAU;IACzB,CAAC,EAAE,CAAC,CAAC;IACL,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAKD,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAItE;AAsBD,kGAAkG;AAClG,wBAAgB,QAAQ,CACtB,OAAO,EAAE,MAAM,EACf,IAAI,GAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAO,GAC9B,UAAU,CAWZ;AAED,8EAA8E;AAC9E,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE;IAAE,UAAU,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,MAAM,CAatF;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,QAAQ,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAInG;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD"}
@@ -0,0 +1,83 @@
1
+ import { homedir } from 'node:os';
2
+ import { join } from 'node:path';
3
+ import { existsSync, mkdirSync, readFileSync, writeFileSync, renameSync, statSync } from 'node:fs';
4
+ import { deriveKek, newSalt, CmekError } from './cmek.js';
5
+ function cmekDir() {
6
+ return join(process.env.KNOWZ_CONFIG_DIR ?? join(homedir(), '.knowz'), 'cmek');
7
+ }
8
+ export function cmekConfigPath(profile) {
9
+ return join(cmekDir(), `${profile}.json`);
10
+ }
11
+ export function isCmekEnabled(profile) {
12
+ return existsSync(cmekConfigPath(profile));
13
+ }
14
+ export function readCmekConfig(profile) {
15
+ const p = cmekConfigPath(profile);
16
+ if (!existsSync(p))
17
+ return undefined;
18
+ return JSON.parse(readFileSync(p, 'utf8'));
19
+ }
20
+ function write0600(path, data) {
21
+ mkdirSync(cmekDir(), { recursive: true, mode: 0o700 });
22
+ const tmp = `${path}.${process.pid}.tmp`;
23
+ writeFileSync(tmp, data, { mode: 0o600 });
24
+ renameSync(tmp, path);
25
+ }
26
+ /** Read a 32-byte key from a key file (raw 32 bytes or 64 hex chars). */
27
+ function readKeyFile(path) {
28
+ const raw = readFileSync(path);
29
+ if (raw.length === 32)
30
+ return raw;
31
+ const text = raw.toString('utf8').trim();
32
+ if (/^[0-9a-f]{64}$/i.test(text))
33
+ return Buffer.from(text, 'hex');
34
+ if (/^[A-Za-z0-9+/=]+$/.test(text)) {
35
+ const b = Buffer.from(text, 'base64');
36
+ if (b.length === 32)
37
+ return b;
38
+ }
39
+ throw new CmekError(`Key file ${path} must contain 32 raw bytes, 64 hex chars, or base64 of 32 bytes`);
40
+ }
41
+ /** Initialize CMEK for a profile. Passphrase mode mints a salt; keyfile mode records the path. */
42
+ export function initCmek(profile, opts = {}) {
43
+ let config;
44
+ if (opts.keyfile) {
45
+ if (!existsSync(opts.keyfile))
46
+ throw new CmekError(`Key file not found: ${opts.keyfile}`);
47
+ readKeyFile(opts.keyfile); // validate
48
+ config = { v: 1, mode: 'keyfile', keyfile: opts.keyfile };
49
+ }
50
+ else {
51
+ config = { v: 1, mode: 'passphrase', salt: newSalt().toString('base64') };
52
+ }
53
+ write0600(cmekConfigPath(profile), JSON.stringify(config));
54
+ return config;
55
+ }
56
+ /** Resolve the 32-byte KEK for a profile (passphrase env/arg or key file). */
57
+ export function resolveKek(profile, opts = {}) {
58
+ const config = readCmekConfig(profile);
59
+ if (!config)
60
+ throw new CmekError(`CMEK not initialized for profile '${profile}'. Run \`knowz cmek init\`.`);
61
+ if (config.mode === 'keyfile') {
62
+ if (!config.keyfile)
63
+ throw new CmekError('CMEK keyfile path missing from config');
64
+ return readKeyFile(config.keyfile);
65
+ }
66
+ const passphrase = opts.passphrase ?? process.env.KNOWZ_CMEK_PASSPHRASE;
67
+ if (!passphrase) {
68
+ throw new CmekError('CMEK passphrase required (set KNOWZ_CMEK_PASSPHRASE or pass --passphrase)');
69
+ }
70
+ if (!config.salt)
71
+ throw new CmekError('CMEK salt missing from config');
72
+ return deriveKek(passphrase, Buffer.from(config.salt, 'base64'));
73
+ }
74
+ export function cmekStatus(profile) {
75
+ const config = readCmekConfig(profile);
76
+ if (!config)
77
+ return { enabled: false };
78
+ return { enabled: true, mode: config.mode, keyfile: config.keyfile };
79
+ }
80
+ export function keyFilePerms(path) {
81
+ return statSync(path).mode & 0o777;
82
+ }
83
+ //# sourceMappingURL=masterkey.js.map
@@ -0,0 +1 @@
1
+ {"version":3,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AAE,OAAO,EAAE,KAAK,EAAE,CAAC;IACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;AACvE,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC;AACrC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "@knowzai/crypto",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "exports": {
6
+ ".": {
7
+ "types": "./dist/index.d.ts",
8
+ "import": "./dist/index.js"
9
+ }
10
+ },
11
+ "main": "./dist/index.js",
12
+ "types": "./dist/index.d.ts",
13
+ "files": [
14
+ "dist"
15
+ ],
16
+ "license": "MIT",
17
+ "author": "Knowz",
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "https://github.com/knowz-io/knowz-platform.git",
21
+ "directory": "cli/crypto"
22
+ },
23
+ "publishConfig": {
24
+ "access": "public"
25
+ },
26
+ "engines": {
27
+ "node": ">=20"
28
+ },
29
+ "scripts": {
30
+ "build": "tsc -b"
31
+ }
32
+ }