k9crypt 1.1.4 → 1.1.5

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/README.md CHANGED
@@ -6,9 +6,9 @@ This is a special encryption algorithm created for K9Crypt.
6
6
 
7
7
  ## Updates
8
8
 
9
- **v1.1.4**
9
+ **v1.1.5**
10
10
 
11
- - You can now use the module in both ES Modules and CommonJS formats. This makes it easier to switch between different module types in your project.
11
+ - HOT FIX: Fixed an issue where installing the module caused a "@types/k9crypt" error.
12
12
 
13
13
  ## Installation
14
14
 
@@ -0,0 +1,8 @@
1
+ export let SALT_SIZE: number;
2
+ export let IV_SIZE: number;
3
+ export let KEY_SIZE: number;
4
+ export let TAG_SIZE: number;
5
+ export let PBKDF2_ITERATIONS: number;
6
+ export let HASH_SEED: number;
7
+ export let PEPPER: string;
8
+ export let HMAC_KEY: string;
@@ -0,0 +1,9 @@
1
+ export = K9crypt;
2
+ declare class K9crypt {
3
+ constructor(secretKey: any);
4
+ secretKey: any;
5
+ _autoGenerated: boolean;
6
+ getGenerated(): any;
7
+ encrypt(plaintext: any): Promise<any>;
8
+ decrypt(ciphertext: any): Promise<any>;
9
+ }
@@ -0,0 +1,2 @@
1
+ export function compress(data: any): Promise<any>;
2
+ export function decompress(data: any): Promise<any>;
@@ -0,0 +1,10 @@
1
+ export function encrypt(data: any, key: any): {
2
+ iv1: any;
3
+ iv2: any;
4
+ iv3: any;
5
+ iv4: any;
6
+ iv5: any;
7
+ encrypted: any;
8
+ tag1: any;
9
+ };
10
+ export function decrypt(encrypted: any, key: any, iv1: any, iv2: any, iv3: any, iv4: any, iv5: any, tag1: any): any;
@@ -0,0 +1,2 @@
1
+ export function hash(data: any): any;
2
+ export function verifyHash(data: any, hash: any): any;
@@ -0,0 +1 @@
1
+ export function deriveKey(password: any, salt: any): any;
@@ -0,0 +1,3 @@
1
+ export function reverseBuffer(data: any, reverse?: boolean): any;
2
+ export function reverseHash(hash: any): any;
3
+ export function enhanceKey(key: any): any;
package/package.json CHANGED
@@ -1,14 +1,21 @@
1
1
  {
2
2
  "name": "k9crypt",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "description": "A special encryption algorithm created for K9Crypt.",
5
5
  "type": "module",
6
6
  "main": "./dist/cjs/index.js",
7
7
  "module": "./dist/esm/index.js",
8
+ "types": "./dist/types/index.d.ts",
8
9
  "exports": {
9
10
  ".": {
10
- "import": "./dist/esm/index.js",
11
- "require": "./dist/cjs/index.js"
11
+ "import": {
12
+ "types": "./dist/types/index.d.ts",
13
+ "default": "./dist/esm/index.js"
14
+ },
15
+ "require": {
16
+ "types": "./dist/types/index.d.ts",
17
+ "default": "./dist/cjs/index.js"
18
+ }
12
19
  }
13
20
  },
14
21
  "files": [
@@ -16,9 +23,11 @@
16
23
  ],
17
24
  "scripts": {
18
25
  "test": "echo \"Error: no test specified\" && exit 1",
26
+ "clean": "rm -rf dist",
27
+ "build:types": "tsc --project tsconfig.json",
19
28
  "build:esm": "babel src --out-dir dist/esm --copy-files",
20
29
  "build:cjs": "babel src --out-dir dist/cjs --copy-files --config-file ./babel.config.cjs",
21
- "build": "bun run build:esm && bun run build:cjs"
30
+ "build": "bun run clean && bun run build:esm && bun run build:cjs && bun run build:types"
22
31
  },
23
32
  "keywords": [
24
33
  "secure",
@@ -50,6 +59,7 @@
50
59
  "devDependencies": {
51
60
  "@babel/cli": "^7.28.0",
52
61
  "@babel/core": "^7.28.0",
53
- "@babel/preset-env": "^7.28.0"
62
+ "@babel/preset-env": "^7.28.0",
63
+ "typescript": "^5.8.3"
54
64
  }
55
65
  }