internxt-crypto 0.0.9-alpha → 0.0.10-alpha
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/dist/asymmetric-crypto.d.mts +41 -0
- package/dist/asymmetric-crypto.d.ts +41 -0
- package/dist/asymmetric-crypto.js +92 -0
- package/dist/asymmetric-crypto.js.map +1 -0
- package/dist/asymmetric-crypto.mjs +85 -0
- package/dist/asymmetric-crypto.mjs.map +1 -0
- package/dist/constants.d.mts +39 -0
- package/dist/constants.d.ts +39 -0
- package/dist/constants.js +80 -0
- package/dist/constants.js.map +1 -0
- package/dist/constants.mjs +42 -0
- package/dist/constants.mjs.map +1 -0
- package/dist/derive-key.d.mts +91 -0
- package/dist/derive-key.d.ts +91 -0
- package/dist/derive-key.js +795 -0
- package/dist/derive-key.js.map +1 -0
- package/dist/derive-key.mjs +784 -0
- package/dist/derive-key.mjs.map +1 -0
- package/dist/email-crypto.d.mts +106 -0
- package/dist/email-crypto.d.ts +106 -0
- package/dist/email-crypto.js +1409 -0
- package/dist/email-crypto.js.map +1 -0
- package/dist/email-crypto.mjs +1381 -0
- package/dist/email-crypto.mjs.map +1 -0
- package/dist/email-search.d.mts +228 -0
- package/dist/email-search.d.ts +228 -0
- package/dist/email-search.js +605 -0
- package/dist/email-search.js.map +1 -0
- package/dist/email-search.mjs +580 -0
- package/dist/email-search.mjs.map +1 -0
- package/dist/email-service.d.mts +38 -0
- package/dist/email-service.d.ts +38 -0
- package/dist/email-service.js +154 -0
- package/dist/email-service.js.map +1 -0
- package/dist/email-service.mjs +147 -0
- package/dist/email-service.mjs.map +1 -0
- package/dist/hash.d.mts +59 -0
- package/dist/hash.d.ts +59 -0
- package/dist/hash.js +95 -0
- package/dist/hash.js.map +1 -0
- package/dist/hash.mjs +85 -0
- package/dist/hash.mjs.map +1 -0
- package/dist/index.d.mts +35 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.js +2697 -2054
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2073 -8247
- package/dist/index.mjs.map +1 -1
- package/dist/keystore-crypto.d.mts +66 -0
- package/dist/keystore-crypto.d.ts +66 -0
- package/dist/keystore-crypto.js +530 -0
- package/dist/keystore-crypto.js.map +1 -0
- package/dist/keystore-crypto.mjs +501 -0
- package/dist/keystore-crypto.mjs.map +1 -0
- package/dist/keystore-service.d.mts +82 -0
- package/dist/keystore-service.d.ts +82 -0
- package/dist/keystore-service.js +349 -0
- package/dist/keystore-service.js.map +1 -0
- package/dist/keystore-service.mjs +342 -0
- package/dist/keystore-service.mjs.map +1 -0
- package/dist/kyber768-B87rMQ7u.d.mts +30 -0
- package/dist/kyber768-B87rMQ7u.d.ts +30 -0
- package/dist/post-quantum-crypto.d.mts +72 -0
- package/dist/post-quantum-crypto.d.ts +72 -0
- package/dist/post-quantum-crypto.js +96 -0
- package/dist/post-quantum-crypto.js.map +1 -0
- package/dist/post-quantum-crypto.mjs +90 -0
- package/dist/post-quantum-crypto.mjs.map +1 -0
- package/dist/storage-service.d.mts +53 -0
- package/dist/storage-service.d.ts +53 -0
- package/dist/storage-service.js +70 -0
- package/dist/storage-service.js.map +1 -0
- package/dist/storage-service.mjs +67 -0
- package/dist/storage-service.mjs.map +1 -0
- package/dist/symmetric-crypto.d.mts +56 -0
- package/dist/symmetric-crypto.d.ts +56 -0
- package/dist/symmetric-crypto.js +142 -0
- package/dist/symmetric-crypto.js.map +1 -0
- package/dist/symmetric-crypto.mjs +134 -0
- package/dist/symmetric-crypto.mjs.map +1 -0
- package/dist/types.d.mts +102 -0
- package/dist/types.d.ts +102 -0
- package/dist/types.js +14 -0
- package/dist/types.js.map +1 -0
- package/dist/types.mjs +12 -0
- package/dist/types.mjs.map +1 -0
- package/dist/utils-BDaK_d6T.d.ts +114 -0
- package/dist/utils-v34IRTIx.d.mts +114 -0
- package/dist/utils.d.mts +140 -0
- package/dist/utils.d.ts +140 -0
- package/dist/utils.js +313 -0
- package/dist/utils.js.map +1 -0
- package/dist/utils.mjs +273 -0
- package/dist/utils.mjs.map +1 -0
- package/package.json +83 -7
- package/dist/__vite-browser-external-Dyvby5gX.js +0 -2
- package/dist/__vite-browser-external-Dyvby5gX.js.map +0 -1
- package/dist/__vite-browser-external-l0sNRNKZ.mjs +0 -2
- package/dist/__vite-browser-external-l0sNRNKZ.mjs.map +0 -1
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
export { g as createPwdProtectedEmail, i as createPwdProtectedEmailAndSubject, f as decryptEmailAndSubjectHybrid, d as decryptEmailHybrid, h as decryptPwdProtectedEmail, j as decryptPwdProtectedEmailAndSubject, b as encryptEmailAndSubjectHybrid, c as encryptEmailAndSubjectHybridForMultipleRecipients, e as encryptEmailHybrid, a as encryptEmailHybridForMultipleRecipients, m as generateEmailID, k as getAux, l as getAuxWithoutSubject } from './utils-v34IRTIx.mjs';
|
|
2
|
+
import { User, EmailBody, HybridEncKey, PwdProtectedKey, EmailPublicParameters, HybridEncryptedEmail, PwdProtectedEmail, Email, PublicKeys, PrivateKeys } from './types.mjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Converts a User type into a base64 string.
|
|
6
|
+
*
|
|
7
|
+
* @param user - The given user.
|
|
8
|
+
* @returns The base64 representation of the user.
|
|
9
|
+
*/
|
|
10
|
+
declare function userToBase64(user: User): string;
|
|
11
|
+
/**
|
|
12
|
+
* Converts a base64 string into a User type
|
|
13
|
+
*
|
|
14
|
+
* @param base64 - The base64 representation of the user.
|
|
15
|
+
* @returns The User type.
|
|
16
|
+
*/
|
|
17
|
+
declare function base64ToUser(base64: string): User;
|
|
18
|
+
/**
|
|
19
|
+
* Converts an EmailBody type into a Uint8Array array.
|
|
20
|
+
*
|
|
21
|
+
* @param body - The email body.
|
|
22
|
+
* @returns The Uint8Array array representation of the EmailBody type.
|
|
23
|
+
*/
|
|
24
|
+
declare function emailBodyToBinary(body: EmailBody): Uint8Array;
|
|
25
|
+
/**
|
|
26
|
+
* Converts an Uint8Array array into EmailBody type.
|
|
27
|
+
*
|
|
28
|
+
* @param array - The Uint8Array array.
|
|
29
|
+
* @returns The EmailBody type representation of the Uint8Array.
|
|
30
|
+
*/
|
|
31
|
+
declare function binaryToEmailBody(array: Uint8Array): EmailBody;
|
|
32
|
+
/**
|
|
33
|
+
* Converts a hybrid key of the type HybridEncKey into base64 string.
|
|
34
|
+
*
|
|
35
|
+
* @param encHybridKey - The HybridEncKey key.
|
|
36
|
+
* @returns The resulting base64 key encoding.
|
|
37
|
+
*/
|
|
38
|
+
declare function encHybridKeyToBase64(encHybridKey: HybridEncKey): string;
|
|
39
|
+
/**
|
|
40
|
+
* Converts a base64 string into a hybrid key of the type HybridEncKey.
|
|
41
|
+
*
|
|
42
|
+
* @param base - The base64 encoding of the hybrid key.
|
|
43
|
+
* @returns The resulting HybridEncKey key.
|
|
44
|
+
*/
|
|
45
|
+
declare function base64ToEncHybridKey(base64: string): HybridEncKey;
|
|
46
|
+
/**
|
|
47
|
+
* Converts a password-protected key of the type PwdProtectedKey into base64 string.
|
|
48
|
+
*
|
|
49
|
+
* @param pwdProtectedKey - The password-protected key of the type PwdProtectedKey.
|
|
50
|
+
* @returns The resulting base64 key encoding.
|
|
51
|
+
*/
|
|
52
|
+
declare function pwdProtectedKeyToBase64(pwdProtectedKey: PwdProtectedKey): string;
|
|
53
|
+
/**
|
|
54
|
+
* Converts a base64 string into a password-protected key of the type PwdProtectedKey.
|
|
55
|
+
*
|
|
56
|
+
* @param base64 - The base64 string.
|
|
57
|
+
* @returns The resulting PwdProtectedKey key.
|
|
58
|
+
*/
|
|
59
|
+
declare function base64ToPwdProtectedKey(base64: string): PwdProtectedKey;
|
|
60
|
+
/**
|
|
61
|
+
* Converts an email public parameters of type EmailPublicParameters into base64 string.
|
|
62
|
+
*
|
|
63
|
+
* @param params - The EmailPublicParameters email paramaters.
|
|
64
|
+
* @returns The resulting base64 string encoding.
|
|
65
|
+
*/
|
|
66
|
+
declare function paramsToBase64(params: EmailPublicParameters): string;
|
|
67
|
+
/**
|
|
68
|
+
* Converts a base64 string into an email paramaters of the type EmailPublicParameters.
|
|
69
|
+
*
|
|
70
|
+
* @param base64 - The base64 string.
|
|
71
|
+
* @returns The resulting EmailPublicParameters email parameters.
|
|
72
|
+
*/
|
|
73
|
+
declare function base64ToParams(base64: string): EmailPublicParameters;
|
|
74
|
+
/**
|
|
75
|
+
* Converts an encrypted via hybrid encryption email into base64 string.
|
|
76
|
+
*
|
|
77
|
+
* @param email - The HybridEncryptedEmail encrypted via hybrid encryption email.
|
|
78
|
+
* @returns The resulting base64 string encoding.
|
|
79
|
+
*/
|
|
80
|
+
declare function hybridEncyptedEmailToBase64(email: HybridEncryptedEmail): string;
|
|
81
|
+
/**
|
|
82
|
+
* Converts a pwd protected email into base64 string.
|
|
83
|
+
*
|
|
84
|
+
* @param email - The PwdProtectedEmail pwd protected email.
|
|
85
|
+
* @returns The resulting base64 string encoding.
|
|
86
|
+
*/
|
|
87
|
+
declare function pwdProtectedEmailToBase64(email: PwdProtectedEmail): string;
|
|
88
|
+
/**
|
|
89
|
+
* Converts an Email type into a Uint8Array array.
|
|
90
|
+
*
|
|
91
|
+
* @param email - The email.
|
|
92
|
+
* @returns The Uint8Array array representation of the Email type.
|
|
93
|
+
*/
|
|
94
|
+
declare function emailToBinary(email: Email): Uint8Array;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Generates public and private keys for email service.
|
|
98
|
+
*
|
|
99
|
+
* @returns The user's private and public keys
|
|
100
|
+
*/
|
|
101
|
+
declare function generateEmailKeys(): Promise<{
|
|
102
|
+
publicKeys: PublicKeys;
|
|
103
|
+
privateKeys: PrivateKeys;
|
|
104
|
+
}>;
|
|
105
|
+
|
|
106
|
+
export { base64ToEncHybridKey, base64ToParams, base64ToPwdProtectedKey, base64ToUser, binaryToEmailBody, emailBodyToBinary, emailToBinary, encHybridKeyToBase64, generateEmailKeys, hybridEncyptedEmailToBase64, paramsToBase64, pwdProtectedEmailToBase64, pwdProtectedKeyToBase64, userToBase64 };
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
export { g as createPwdProtectedEmail, i as createPwdProtectedEmailAndSubject, f as decryptEmailAndSubjectHybrid, d as decryptEmailHybrid, h as decryptPwdProtectedEmail, j as decryptPwdProtectedEmailAndSubject, b as encryptEmailAndSubjectHybrid, c as encryptEmailAndSubjectHybridForMultipleRecipients, e as encryptEmailHybrid, a as encryptEmailHybridForMultipleRecipients, m as generateEmailID, k as getAux, l as getAuxWithoutSubject } from './utils-BDaK_d6T.js';
|
|
2
|
+
import { User, EmailBody, HybridEncKey, PwdProtectedKey, EmailPublicParameters, HybridEncryptedEmail, PwdProtectedEmail, Email, PublicKeys, PrivateKeys } from './types.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Converts a User type into a base64 string.
|
|
6
|
+
*
|
|
7
|
+
* @param user - The given user.
|
|
8
|
+
* @returns The base64 representation of the user.
|
|
9
|
+
*/
|
|
10
|
+
declare function userToBase64(user: User): string;
|
|
11
|
+
/**
|
|
12
|
+
* Converts a base64 string into a User type
|
|
13
|
+
*
|
|
14
|
+
* @param base64 - The base64 representation of the user.
|
|
15
|
+
* @returns The User type.
|
|
16
|
+
*/
|
|
17
|
+
declare function base64ToUser(base64: string): User;
|
|
18
|
+
/**
|
|
19
|
+
* Converts an EmailBody type into a Uint8Array array.
|
|
20
|
+
*
|
|
21
|
+
* @param body - The email body.
|
|
22
|
+
* @returns The Uint8Array array representation of the EmailBody type.
|
|
23
|
+
*/
|
|
24
|
+
declare function emailBodyToBinary(body: EmailBody): Uint8Array;
|
|
25
|
+
/**
|
|
26
|
+
* Converts an Uint8Array array into EmailBody type.
|
|
27
|
+
*
|
|
28
|
+
* @param array - The Uint8Array array.
|
|
29
|
+
* @returns The EmailBody type representation of the Uint8Array.
|
|
30
|
+
*/
|
|
31
|
+
declare function binaryToEmailBody(array: Uint8Array): EmailBody;
|
|
32
|
+
/**
|
|
33
|
+
* Converts a hybrid key of the type HybridEncKey into base64 string.
|
|
34
|
+
*
|
|
35
|
+
* @param encHybridKey - The HybridEncKey key.
|
|
36
|
+
* @returns The resulting base64 key encoding.
|
|
37
|
+
*/
|
|
38
|
+
declare function encHybridKeyToBase64(encHybridKey: HybridEncKey): string;
|
|
39
|
+
/**
|
|
40
|
+
* Converts a base64 string into a hybrid key of the type HybridEncKey.
|
|
41
|
+
*
|
|
42
|
+
* @param base - The base64 encoding of the hybrid key.
|
|
43
|
+
* @returns The resulting HybridEncKey key.
|
|
44
|
+
*/
|
|
45
|
+
declare function base64ToEncHybridKey(base64: string): HybridEncKey;
|
|
46
|
+
/**
|
|
47
|
+
* Converts a password-protected key of the type PwdProtectedKey into base64 string.
|
|
48
|
+
*
|
|
49
|
+
* @param pwdProtectedKey - The password-protected key of the type PwdProtectedKey.
|
|
50
|
+
* @returns The resulting base64 key encoding.
|
|
51
|
+
*/
|
|
52
|
+
declare function pwdProtectedKeyToBase64(pwdProtectedKey: PwdProtectedKey): string;
|
|
53
|
+
/**
|
|
54
|
+
* Converts a base64 string into a password-protected key of the type PwdProtectedKey.
|
|
55
|
+
*
|
|
56
|
+
* @param base64 - The base64 string.
|
|
57
|
+
* @returns The resulting PwdProtectedKey key.
|
|
58
|
+
*/
|
|
59
|
+
declare function base64ToPwdProtectedKey(base64: string): PwdProtectedKey;
|
|
60
|
+
/**
|
|
61
|
+
* Converts an email public parameters of type EmailPublicParameters into base64 string.
|
|
62
|
+
*
|
|
63
|
+
* @param params - The EmailPublicParameters email paramaters.
|
|
64
|
+
* @returns The resulting base64 string encoding.
|
|
65
|
+
*/
|
|
66
|
+
declare function paramsToBase64(params: EmailPublicParameters): string;
|
|
67
|
+
/**
|
|
68
|
+
* Converts a base64 string into an email paramaters of the type EmailPublicParameters.
|
|
69
|
+
*
|
|
70
|
+
* @param base64 - The base64 string.
|
|
71
|
+
* @returns The resulting EmailPublicParameters email parameters.
|
|
72
|
+
*/
|
|
73
|
+
declare function base64ToParams(base64: string): EmailPublicParameters;
|
|
74
|
+
/**
|
|
75
|
+
* Converts an encrypted via hybrid encryption email into base64 string.
|
|
76
|
+
*
|
|
77
|
+
* @param email - The HybridEncryptedEmail encrypted via hybrid encryption email.
|
|
78
|
+
* @returns The resulting base64 string encoding.
|
|
79
|
+
*/
|
|
80
|
+
declare function hybridEncyptedEmailToBase64(email: HybridEncryptedEmail): string;
|
|
81
|
+
/**
|
|
82
|
+
* Converts a pwd protected email into base64 string.
|
|
83
|
+
*
|
|
84
|
+
* @param email - The PwdProtectedEmail pwd protected email.
|
|
85
|
+
* @returns The resulting base64 string encoding.
|
|
86
|
+
*/
|
|
87
|
+
declare function pwdProtectedEmailToBase64(email: PwdProtectedEmail): string;
|
|
88
|
+
/**
|
|
89
|
+
* Converts an Email type into a Uint8Array array.
|
|
90
|
+
*
|
|
91
|
+
* @param email - The email.
|
|
92
|
+
* @returns The Uint8Array array representation of the Email type.
|
|
93
|
+
*/
|
|
94
|
+
declare function emailToBinary(email: Email): Uint8Array;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Generates public and private keys for email service.
|
|
98
|
+
*
|
|
99
|
+
* @returns The user's private and public keys
|
|
100
|
+
*/
|
|
101
|
+
declare function generateEmailKeys(): Promise<{
|
|
102
|
+
publicKeys: PublicKeys;
|
|
103
|
+
privateKeys: PrivateKeys;
|
|
104
|
+
}>;
|
|
105
|
+
|
|
106
|
+
export { base64ToEncHybridKey, base64ToParams, base64ToPwdProtectedKey, base64ToUser, binaryToEmailBody, emailBodyToBinary, emailToBinary, encHybridKeyToBase64, generateEmailKeys, hybridEncyptedEmailToBase64, paramsToBase64, pwdProtectedEmailToBase64, pwdProtectedKeyToBase64, userToBase64 };
|