ddan-js 4.0.3 → 4.1.1

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.
@@ -14,6 +14,8 @@ export default class Ecdh {
14
14
  importKey(keyBase64: string, keyFormat?: TKeyFormat, usages?: KeyUsage[]): Promise<CryptoKey>;
15
15
  setPrivateKey(privateBase64: string): Promise<boolean>;
16
16
  deriveSharedSecret(publicKeyBase64: string, iv?: string): Promise<boolean>;
17
+ deriveSharedBits(publicKeyBase64: string): Promise<ArrayBuffer | null>;
18
+ deriveShareBase64(publicKeyBase64: string): Promise<string>;
17
19
  encode(data: string, iv?: string): Promise<string>;
18
20
  encodeiv(data: string, iv?: string): Promise<string>;
19
21
  decode(encrypted: string, iv?: string): Promise<string>;
@@ -0,0 +1,7 @@
1
+ declare const _default: {
2
+ aesGcmEncrypt: (text: string, aesKey: CryptoKey) => Promise<string>;
3
+ aesGcmDecrypt: (encryptedBase64: string, aesKey: CryptoKey) => Promise<string>;
4
+ aesCryptoKey: (sharedBase64: string) => Promise<CryptoKey | null>;
5
+ aesCryptoKeyFromHkdf: (sharedBase64: string, saltBase64: string, infoBase64: string) => Promise<CryptoKey | null>;
6
+ };
7
+ export default _default;
@@ -0,0 +1,7 @@
1
+ declare const _default: {
2
+ aesGcmEncrypt: (subtle: any, plaintext: string, aesKey: CryptoKey) => Promise<string>;
3
+ aesGcmDecrypt: (subtle: any, encryptedBase64: string, aesKey: CryptoKey) => Promise<string>;
4
+ aesCryptoKey: (subtle: any, sharedBase64: string) => Promise<CryptoKey | null>;
5
+ aesCryptoKeyFromHkdf: (subtle: any, sharedBase64: string, saltBase64: string, infoBase64: string) => Promise<CryptoKey | null>;
6
+ };
7
+ export default _default;
@@ -0,0 +1,7 @@
1
+ declare const _default: {
2
+ aesGcmEncrypt: (text: string, aesKey: CryptoKey) => Promise<string>;
3
+ aesGcmDecrypt: (encryptedBase64: string, aesKey: CryptoKey) => Promise<string>;
4
+ aesCryptoKey: (sharedBase64: string) => Promise<CryptoKey | null>;
5
+ aesCryptoKeyFromHkdf: (sharedBase64: string, saltBase64: string, infoBase64: string) => Promise<CryptoKey | null>;
6
+ };
7
+ export default _default;
@@ -17,6 +17,12 @@ declare const _default: {
17
17
  encode: (data: string) => Promise<string>;
18
18
  decode: (encryptedBase64: string) => Promise<string>;
19
19
  };
20
+ cipher: {
21
+ aesGcmEncrypt: (subtle: any, plaintext: string, aesKey: CryptoKey) => Promise<string>;
22
+ aesGcmDecrypt: (subtle: any, encryptedBase64: string, aesKey: CryptoKey) => Promise<string>;
23
+ aesCryptoKey: (subtle: any, sharedBase64: string) => Promise<CryptoKey | null>;
24
+ aesCryptoKeyFromHkdf: (subtle: any, sharedBase64: string, saltBase64: string, infoBase64: string) => Promise<CryptoKey | null>;
25
+ };
20
26
  findFreePort: (startPort: number, maxRetries?: number) => Promise<number>;
21
27
  getSystemProxy: () => Promise<{
22
28
  ipaddress: string;
@@ -14,6 +14,12 @@ declare const dNode: {
14
14
  encode: (data: string) => Promise<string>;
15
15
  decode: (encryptedBase64: string) => Promise<string>;
16
16
  };
17
+ cipher: {
18
+ aesGcmEncrypt: (subtle: any, plaintext: string, aesKey: CryptoKey) => Promise<string>;
19
+ aesGcmDecrypt: (subtle: any, encryptedBase64: string, aesKey: CryptoKey) => Promise<string>;
20
+ aesCryptoKey: (subtle: any, sharedBase64: string) => Promise<CryptoKey | null>;
21
+ aesCryptoKeyFromHkdf: (subtle: any, sharedBase64: string, saltBase64: string, infoBase64: string) => Promise<CryptoKey | null>;
22
+ };
17
23
  findFreePort: (startPort: number, maxRetries?: number) => Promise<number>;
18
24
  getSystemProxy: () => Promise<{
19
25
  ipaddress: string;
package/bin/tiny/web.d.ts CHANGED
@@ -181,5 +181,11 @@ declare const dWeb: {
181
181
  encode: (data: string) => Promise<string>;
182
182
  decode: (encryptedBase64: string) => Promise<string>;
183
183
  };
184
+ cipher: {
185
+ aesGcmEncrypt: (text: string, aesKey: CryptoKey) => Promise<string>;
186
+ aesGcmDecrypt: (encryptedBase64: string, aesKey: CryptoKey) => Promise<string>;
187
+ aesCryptoKey: (sharedBase64: string) => Promise<CryptoKey | null>;
188
+ aesCryptoKeyFromHkdf: (sharedBase64: string, saltBase64: string, infoBase64: string) => Promise<CryptoKey | null>;
189
+ };
184
190
  };
185
191
  export default dWeb;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ddan-js",
3
- "version": "4.0.3",
3
+ "version": "4.1.1",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "ddan-js",