@sudoplatform/sudo-common 7.1.3 → 8.0.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.
Files changed (103) hide show
  1. package/bin/outdated-with-suppression.sh +203 -0
  2. package/bin/suppress-audit.sh +15 -0
  3. package/bin/suppress-outdated.sh +60 -0
  4. package/bin/yarn-audit-with-suppression.sh +19 -0
  5. package/cjs/configurationManager/defaultConfigurationManager.d.ts +123 -0
  6. package/cjs/configurationManager/defaultConfigurationManager.js +122 -0
  7. package/cjs/configurationManager/defaultConfigurationManager.js.map +1 -0
  8. package/cjs/errors/error.d.ts +263 -0
  9. package/cjs/errors/error.js +442 -0
  10. package/cjs/errors/error.js.map +1 -0
  11. package/cjs/index.d.ts +9 -0
  12. package/cjs/index.js +13 -0
  13. package/cjs/index.js.map +1 -0
  14. package/cjs/logging/bunyanLogger.d.ts +8 -0
  15. package/cjs/logging/bunyanLogger.js +36 -0
  16. package/cjs/logging/bunyanLogger.js.map +1 -0
  17. package/cjs/logging/logger.d.ts +87 -0
  18. package/cjs/logging/logger.js +77 -0
  19. package/cjs/logging/logger.js.map +1 -0
  20. package/cjs/sudoKeyArchive/index.d.ts +4 -0
  21. package/cjs/sudoKeyArchive/index.js +8 -0
  22. package/cjs/sudoKeyArchive/index.js.map +1 -0
  23. package/cjs/sudoKeyArchive/keyArchive.d.ts +137 -0
  24. package/cjs/sudoKeyArchive/keyArchive.js +84 -0
  25. package/cjs/sudoKeyArchive/keyArchive.js.map +1 -0
  26. package/cjs/sudoKeyArchive/keyInfo.d.ts +41 -0
  27. package/cjs/sudoKeyArchive/keyInfo.js +17 -0
  28. package/cjs/sudoKeyArchive/keyInfo.js.map +1 -0
  29. package/cjs/sudoKeyArchive/keyType.d.ts +13 -0
  30. package/cjs/sudoKeyArchive/keyType.js +39 -0
  31. package/cjs/sudoKeyArchive/keyType.js.map +1 -0
  32. package/cjs/sudoKeyArchive/sudoKeyArchive.d.ts +190 -0
  33. package/cjs/sudoKeyArchive/sudoKeyArchive.js +373 -0
  34. package/cjs/sudoKeyArchive/sudoKeyArchive.js.map +1 -0
  35. package/cjs/sudoKeyManager/index.d.ts +4 -0
  36. package/cjs/sudoKeyManager/index.js +8 -0
  37. package/cjs/sudoKeyManager/index.js.map +1 -0
  38. package/cjs/sudoKeyManager/keyData.d.ts +56 -0
  39. package/cjs/sudoKeyManager/keyData.js +46 -0
  40. package/cjs/sudoKeyManager/keyData.js.map +1 -0
  41. package/cjs/sudoKeyManager/publicKey.d.ts +8 -0
  42. package/cjs/sudoKeyManager/publicKey.js +9 -0
  43. package/cjs/sudoKeyManager/publicKey.js.map +1 -0
  44. package/cjs/sudoKeyManager/sudoCryptoProvider.d.ts +324 -0
  45. package/cjs/sudoKeyManager/sudoCryptoProvider.js +12 -0
  46. package/cjs/sudoKeyManager/sudoCryptoProvider.js.map +1 -0
  47. package/cjs/sudoKeyManager/sudoKeyManager.d.ts +344 -0
  48. package/cjs/sudoKeyManager/sudoKeyManager.js +140 -0
  49. package/cjs/sudoKeyManager/sudoKeyManager.js.map +1 -0
  50. package/cjs/types/types.d.ts +115 -0
  51. package/cjs/types/types.js +45 -0
  52. package/cjs/types/types.js.map +1 -0
  53. package/cjs/utils/base64.d.ts +44 -0
  54. package/cjs/utils/base64.js +71 -0
  55. package/cjs/utils/base64.js.map +1 -0
  56. package/cjs/utils/buffer.d.ts +13 -0
  57. package/cjs/utils/buffer.js +37 -0
  58. package/cjs/utils/buffer.js.map +1 -0
  59. package/cjs/utils/stream.d.ts +6 -0
  60. package/cjs/utils/stream.js +70 -0
  61. package/cjs/utils/stream.js.map +1 -0
  62. package/lib/configurationManager/defaultConfigurationManager.js +106 -156
  63. package/lib/configurationManager/defaultConfigurationManager.js.map +1 -0
  64. package/lib/errors/error.js +226 -438
  65. package/lib/errors/error.js.map +1 -0
  66. package/lib/index.d.ts +1 -0
  67. package/lib/index.js +10 -109
  68. package/lib/index.js.map +1 -0
  69. package/lib/logging/bunyanLogger.js +29 -41
  70. package/lib/logging/bunyanLogger.js.map +1 -0
  71. package/lib/logging/logger.js +66 -92
  72. package/lib/logging/logger.js.map +1 -0
  73. package/lib/sudoKeyArchive/index.js +5 -57
  74. package/lib/sudoKeyArchive/index.js.map +1 -0
  75. package/lib/sudoKeyArchive/keyArchive.d.ts +8 -8
  76. package/lib/sudoKeyArchive/keyArchive.js +69 -96
  77. package/lib/sudoKeyArchive/keyArchive.js.map +1 -0
  78. package/lib/sudoKeyArchive/keyInfo.js +11 -49
  79. package/lib/sudoKeyArchive/keyInfo.js.map +1 -0
  80. package/lib/sudoKeyArchive/keyType.js +27 -37
  81. package/lib/sudoKeyArchive/keyType.js.map +1 -0
  82. package/lib/sudoKeyArchive/sudoKeyArchive.js +351 -444
  83. package/lib/sudoKeyArchive/sudoKeyArchive.js.map +1 -0
  84. package/lib/sudoKeyManager/index.js +5 -57
  85. package/lib/sudoKeyManager/index.js.map +1 -0
  86. package/lib/sudoKeyManager/keyData.js +38 -33
  87. package/lib/sudoKeyManager/keyData.js.map +1 -0
  88. package/lib/sudoKeyManager/publicKey.js +5 -12
  89. package/lib/sudoKeyManager/publicKey.js.map +1 -0
  90. package/lib/sudoKeyManager/sudoCryptoProvider.js +8 -26
  91. package/lib/sudoKeyManager/sudoCryptoProvider.js.map +1 -0
  92. package/lib/sudoKeyManager/sudoKeyManager.js +135 -173
  93. package/lib/sudoKeyManager/sudoKeyManager.js.map +1 -0
  94. package/lib/types/types.js +27 -33
  95. package/lib/types/types.js.map +1 -0
  96. package/lib/utils/base64.js +63 -93
  97. package/lib/utils/base64.js.map +1 -0
  98. package/lib/utils/buffer.js +28 -46
  99. package/lib/utils/buffer.js.map +1 -0
  100. package/lib/utils/stream.d.ts +6 -0
  101. package/lib/utils/stream.js +63 -0
  102. package/lib/utils/stream.js.map +1 -0
  103. package/package.json +35 -27
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.KeyDataKeyFormat = exports.KeyDataKeyType = void 0;
4
+ /**
5
+ * Type of key
6
+ */
7
+ var KeyDataKeyType;
8
+ (function (KeyDataKeyType) {
9
+ KeyDataKeyType["SymmetricKey"] = "SymmetricKey";
10
+ KeyDataKeyType["RSAPublicKey"] = "RSAPublicKey";
11
+ KeyDataKeyType["RSAPrivateKey"] = "RSAPrivateKey";
12
+ KeyDataKeyType["Password"] = "Password";
13
+ })(KeyDataKeyType = exports.KeyDataKeyType || (exports.KeyDataKeyType = {}));
14
+ var KeyDataKeyFormat;
15
+ (function (KeyDataKeyFormat) {
16
+ /**
17
+ * Raw key format.
18
+ *
19
+ * For SymmetricKey and Password types this means the raw bytes
20
+ * of the key/password.
21
+ *
22
+ * For RSAPublicKey this means RSAPublicKey binary format.
23
+ * For RSAPrivateKey this means RSAPrivateKey binary format.
24
+ * "RSA PUBLIC KEY" or "RSA PRIVATE KEY" in PEM speak
25
+ */
26
+ KeyDataKeyFormat["Raw"] = "Raw";
27
+ /**
28
+ * SPKI public key format.
29
+ *
30
+ * Applies to public keys (currently only RSAPublicKey)
31
+ * and means they are formated using SPKI.
32
+ *
33
+ * "PUBLIC KEY" in PEM speak
34
+ */
35
+ KeyDataKeyFormat["SPKI"] = "SPKI";
36
+ /**
37
+ * PKCS8 private key format.
38
+ *
39
+ * Applies to private keys (currently only RSAPrivateKey)
40
+ * and means they are formated using unencrypted PKCS8.
41
+ *
42
+ * "PRIVATE KEY" in PEM speak
43
+ */
44
+ KeyDataKeyFormat["PKCS8"] = "PKCS8";
45
+ })(KeyDataKeyFormat = exports.KeyDataKeyFormat || (exports.KeyDataKeyFormat = {}));
46
+ //# sourceMappingURL=keyData.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyData.js","sourceRoot":"","sources":["../../src/sudoKeyManager/keyData.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,cAKX;AALD,WAAY,cAAc;IACxB,+CAA6B,CAAA;IAC7B,+CAA6B,CAAA;IAC7B,iDAA+B,CAAA;IAC/B,uCAAqB,CAAA;AACvB,CAAC,EALW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAKzB;AAED,IAAY,gBAgCX;AAhCD,WAAY,gBAAgB;IAC1B;;;;;;;;;OASG;IACH,+BAAW,CAAA;IAEX;;;;;;;OAOG;IACH,iCAAa,CAAA;IAEb;;;;;;;OAOG;IACH,mCAAe,CAAA;AACjB,CAAC,EAhCW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAgC3B"}
@@ -0,0 +1,8 @@
1
+ export declare enum PublicKeyFormat {
2
+ RSAPublicKey = 0,
3
+ SPKI = 1
4
+ }
5
+ export interface PublicKey {
6
+ readonly keyData: ArrayBuffer;
7
+ readonly keyFormat: PublicKeyFormat;
8
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PublicKeyFormat = void 0;
4
+ var PublicKeyFormat;
5
+ (function (PublicKeyFormat) {
6
+ PublicKeyFormat[PublicKeyFormat["RSAPublicKey"] = 0] = "RSAPublicKey";
7
+ PublicKeyFormat[PublicKeyFormat["SPKI"] = 1] = "SPKI";
8
+ })(PublicKeyFormat = exports.PublicKeyFormat || (exports.PublicKeyFormat = {}));
9
+ //# sourceMappingURL=publicKey.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"publicKey.js","sourceRoot":"","sources":["../../src/sudoKeyManager/publicKey.ts"],"names":[],"mappings":";;;AAAA,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,qEAAY,CAAA;IACZ,qDAAI,CAAA;AACN,CAAC,EAHW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAG1B"}
@@ -0,0 +1,324 @@
1
+ import { EncryptionAlgorithm } from '../types/types';
2
+ import { KeyData } from './keyData';
3
+ import { PublicKey } from './publicKey';
4
+ export declare class SudoCryptoProviderDefaults {
5
+ static readonly aesIVSize = 16;
6
+ static readonly aesKeySize = 256;
7
+ static readonly rsaKeySize = 2048;
8
+ static readonly pbkdfRounds = 10000;
9
+ static readonly pbkdfSaltSize = 16;
10
+ }
11
+ /**
12
+ * Optional arguments for symmetric encryption..
13
+ */
14
+ export interface SymmetricEncryptionOptions {
15
+ iv?: ArrayBuffer;
16
+ algorithm?: EncryptionAlgorithm;
17
+ }
18
+ /**
19
+ * Optional arguments for public key encryption.
20
+ */
21
+ export interface AsymmetricEncryptionOptions {
22
+ algorithm?: EncryptionAlgorithm;
23
+ }
24
+ /**
25
+ * CryptoProvider instance interface
26
+ */
27
+ export interface SudoCryptoProvider {
28
+ getNamespace(): string;
29
+ getServiceName(): string;
30
+ /**
31
+ * Adds as password to the secure store.
32
+ *
33
+ * @param password The password to store.
34
+ * @param name The name of the password.
35
+ */
36
+ addPassword(password: ArrayBuffer, name: string): Promise<void>;
37
+ /**
38
+ * Retrieves a password from the secure store.
39
+ *
40
+ * @param name The name of the password to retrieve.
41
+ *
42
+ * @returns The password or undefined if a password with the given name was not found.
43
+ */
44
+ getPassword(name: string): Promise<ArrayBuffer | undefined>;
45
+ /**
46
+ * Deletes a password from the secure store.
47
+ *
48
+ * @param name The name of the password to delete.
49
+ */
50
+ deletePassword(name: string): Promise<void>;
51
+ /**
52
+ * Updates a password stored in the secure store.
53
+ *
54
+ * @param password The new password.
55
+ * @param name The name of the password to update.
56
+ */
57
+ updatePassword(password: ArrayBuffer, name: string): Promise<void>;
58
+ /**
59
+ * Adds a symmetric key to the secure store.
60
+ *
61
+ * @param key The symmetric key.
62
+ * @param name The name for the symmetric key.
63
+ */
64
+ addSymmetricKey(key: ArrayBuffer, name: string): Promise<void>;
65
+ /**
66
+ * Retrieves a symmetric key from the secure store.
67
+ *
68
+ * @param name The name of the symmetric key.
69
+ *
70
+ * @returns The symmetric key or undefined if not found.
71
+ */
72
+ getSymmetricKey(name: string): Promise<ArrayBuffer | undefined>;
73
+ /**
74
+ * Checks to see if the specified symmetric key exists.
75
+ *
76
+ * @param name The name of the symmetric key.
77
+ */
78
+ doesSymmetricKeyExist(name: string): Promise<boolean>;
79
+ /**
80
+ * Deletes a symmetric key from the secure store.
81
+ *
82
+ * @param name The name of the symmetric key.
83
+ */
84
+ deleteSymmetricKey(name: string): Promise<void>;
85
+ /**
86
+ * Generates a symmetric key and stores it securely.
87
+ *
88
+ * @param name The name for the symmetric key.
89
+ */
90
+ generateSymmetricKey(name: string): Promise<void>;
91
+ /**
92
+ * Generates a symmetric key from a password using PBKDF2.
93
+ *
94
+ * @param password The password from which to generate the symmetric key
95
+ * @param salt Salt to use in generation of the key
96
+ * @param rounds The number of rounds of PBKDF2 to perform. Default: per getDefaultPBKDF2Rounds
97
+ *
98
+ * @returns The generated symmetric key.
99
+ */
100
+ generateSymmetricKeyFromPassword(password: ArrayBuffer, salt: ArrayBuffer, options?: {
101
+ rounds?: number;
102
+ }): Promise<ArrayBuffer>;
103
+ /**
104
+ * Generate random bytes using a secure random number generator.
105
+ *
106
+ * @param size Number of random bytes to generate
107
+ *
108
+ * @returns ArrayBuffer containing the random bytes.
109
+ */
110
+ generateRandomData(size: number): Promise<ArrayBuffer>;
111
+ /**
112
+ * Deletes a key pair from the secure store.
113
+ *
114
+ * @param name The name of the key pair to be deleted.
115
+ */
116
+ deleteKeyPair(name: string): Promise<void>;
117
+ /**
118
+ * Generates a signature for the given data with the specified private key.
119
+ *
120
+ * @param name The name of the private key to use for generation.
121
+ * @param data The data to sign.
122
+ *
123
+ * @returns Data signature
124
+ *
125
+ * @throws {@link KeyNotFoundError}
126
+ */
127
+ generateSignatureWithPrivateKey(name: string, data: ArrayBuffer): Promise<ArrayBuffer>;
128
+ /**
129
+ * Verifies the given data against the provided signature using the specified public key.
130
+ *
131
+ * @param name The name of the public key to use for validation.
132
+ * @param data The data to verify
133
+ * @param signature The signature to verify against
134
+ *
135
+ * @returns True if the data and signature could be successfully verified
136
+ */
137
+ verifySignatureWithPublicKey(name: string, data: ArrayBuffer, signature: ArrayBuffer): Promise<boolean>;
138
+ /**
139
+ * Adds a private key to the secure store.
140
+ *
141
+ * @param key The private key to store securely.
142
+ * @param name The name of the private key to be stored.
143
+ */
144
+ addPrivateKey(key: ArrayBuffer, name: string): Promise<void>;
145
+ /**
146
+ * Retrieves a private key from the secure store.
147
+ *
148
+ * @param name The name of the private key to be retrieved.
149
+ *
150
+ * @returns Requested private key or undefined if the key was not found.
151
+ */
152
+ getPrivateKey(name: string): Promise<ArrayBuffer | undefined>;
153
+ /**
154
+ * Checks to see if the specified private key exists.
155
+ *
156
+ * @param name The name of the private key.
157
+ */
158
+ doesPrivateKeyExist(name: string): Promise<boolean>;
159
+ /**
160
+ * Adds a public key to the secure store.
161
+ *
162
+ * @param key The public key to store securely.
163
+ * @param name The name of the public key to be stored.
164
+ */
165
+ addPublicKey(key: ArrayBuffer, name: string): Promise<void>;
166
+ /**
167
+ * Deletes the specified public key from the secure store.
168
+ *
169
+ * @param name The name of the public key to be removed.
170
+ */
171
+ deletePublicKey(name: string): Promise<void>;
172
+ /**
173
+ * Retrieves the public key from the secure store.
174
+ *
175
+ * @param name The name of the public key.
176
+ *
177
+ * @returns The public key or undefined if the key was not found.
178
+ */
179
+ getPublicKey(name: string): Promise<PublicKey | undefined>;
180
+ /**
181
+ * Clear all types of keys
182
+ */
183
+ removeAllKeys(): Promise<void>;
184
+ /**
185
+ * @deprecated Use version with `options` param.
186
+ *
187
+ * Encrypts the given data with the specified symmetric key stored in the secure store.
188
+ *
189
+ * @param name The name of the symmetric key to use to encrypt.
190
+ * @param data Data to encrypt.
191
+ * @param iv Optional Initialization Vector.
192
+ *
193
+ * @returns Encrypted data and IV
194
+ */
195
+ encryptWithSymmetricKeyName(name: string, data: ArrayBuffer, iv?: ArrayBuffer): Promise<ArrayBuffer>;
196
+ /**
197
+ * Encrypts the given data with the specified symmetric key stored in the secure store.
198
+ *
199
+ * @param name The name of the symmetric key to use to encrypt.
200
+ * @param data Data to encrypt.
201
+ *
202
+ *
203
+ * @returns Encrypted data and IV
204
+ *
205
+ * @throws {@link UnrecognizedAlgorithmError}
206
+ * @throws {@link KeyNotFoundError}
207
+ */
208
+ encryptWithSymmetricKeyName(name: string, data: ArrayBuffer, options?: SymmetricEncryptionOptions): Promise<ArrayBuffer>;
209
+ /**
210
+ * @deprecated Use version with `options` param.
211
+ *
212
+ * Decrypt the given data with the specified symmetric key stored in the secure store.
213
+ *
214
+ * @param name The name of the symmetric key to use to decrypt.
215
+ * @param data The data to decrypt.
216
+ * @param iv Optional Initialization Vector.
217
+ *
218
+ * @returns Decrypted data
219
+ */
220
+ decryptWithSymmetricKeyName(name: string, data: ArrayBuffer, iv?: ArrayBuffer): Promise<ArrayBuffer>;
221
+ /**
222
+ * Decrypt the given data with the specified symmetric key stored in the secure store.
223
+ *
224
+ * @param name The name of the symmetric key to use to decrypt.
225
+ * @param data The data to decrypt.
226
+ *
227
+ * @returns Decrypted data
228
+ *
229
+ * @throws {@link UnrecognizedAlgorithmError}
230
+ * @throws {@link KeyNotFoundError}
231
+ */
232
+ decryptWithSymmetricKeyName(name: string, data: ArrayBuffer, options?: SymmetricEncryptionOptions): Promise<ArrayBuffer>;
233
+ /**
234
+ * @deprecated Use version with `options` param.
235
+ *
236
+ * Encrypts the given data with the specified key
237
+ *
238
+ * @param name The name of the symmetric key to use to encrypt.
239
+ * @param data Data to encrypt.
240
+ * @param iv Optional Initialization Vector.
241
+ *
242
+ * @returns Encrypted data and IV
243
+ */
244
+ encryptWithSymmetricKey(key: ArrayBuffer, data: ArrayBuffer, iv?: ArrayBuffer): Promise<ArrayBuffer>;
245
+ /**
246
+ * Encrypts the given data with the specified key
247
+ *
248
+ * @param name The name of the symmetric key to use to encrypt.
249
+ * @param data Data to encrypt.
250
+ *
251
+ * @returns Encrypted data and IV
252
+ *
253
+ * @throws {@link UnrecognizedAlgorithmError}
254
+ */
255
+ encryptWithSymmetricKey(key: ArrayBuffer, data: ArrayBuffer, options?: SymmetricEncryptionOptions): Promise<ArrayBuffer>;
256
+ /**
257
+ * @deprecated Use version with `options` param.
258
+ *
259
+ * Decrypt the given data with the specified symmetric key stored in the secure store.
260
+ *
261
+ * @param name The name of the symmetric key to use to decrypt.
262
+ * @param data The data to decrypt.
263
+ * @param iv Optional Initialization Vector.
264
+ *
265
+ * @returns Decrypted data
266
+ */
267
+ decryptWithSymmetricKey(key: ArrayBuffer, data: ArrayBuffer, iv?: ArrayBuffer): Promise<ArrayBuffer>;
268
+ /**
269
+ * Decrypt the given data with the specified symmetric key stored in the secure store.
270
+ *
271
+ * @param name The name of the symmetric key to use to decrypt.
272
+ * @param data The data to decrypt.
273
+ *
274
+ * @returns Decrypted data
275
+ *
276
+ * @throws {@link UnrecognizedAlgorithmError}
277
+ */
278
+ decryptWithSymmetricKey(key: ArrayBuffer, data: ArrayBuffer, options?: SymmetricEncryptionOptions): Promise<ArrayBuffer>;
279
+ /**
280
+ * Encrypts the given data with the specified public key.
281
+ *
282
+ * @param name The name of the public key to use for encryption.
283
+ * @param data The data to encrypt.
284
+ *
285
+ * @returns Encrypted data
286
+ *
287
+ * @throws {@link UnrecognizedAlgorithmError}
288
+ * @throws {@link KeyNotFoundError}
289
+ */
290
+ encryptWithPublicKey(name: string, data: ArrayBuffer, options?: AsymmetricEncryptionOptions): Promise<ArrayBuffer>;
291
+ /**
292
+ * Decrypts the given data with the specified private key.
293
+ *
294
+ * @param name The name of the private key to use for decryption.
295
+ * @param data The data to decrypt.
296
+ *
297
+ * @returns Decrypted data.
298
+ *
299
+ * @throws {@link UnrecognizedAlgorithmError}
300
+ * @throws {@link KeyNotFoundError}
301
+ */
302
+ decryptWithPrivateKey(name: string, data: ArrayBuffer, options?: AsymmetricEncryptionOptions): Promise<ArrayBuffer>;
303
+ /**
304
+ * Generates and securely stores a key pair for public key cryptography.
305
+ *
306
+ * @param name The name of the key pair to be generated.
307
+ */
308
+ generateKeyPair(name: string): Promise<void>;
309
+ /**
310
+ * Creates a SHA256 hash of the specified data.
311
+ *
312
+ * @param data Data to hash.
313
+ *
314
+ * @returns The SHA256 hash of data
315
+ */
316
+ generateHash(data: ArrayBuffer): Promise<ArrayBuffer>;
317
+ /**
318
+ * Export all keys and passwords from the key store as an
319
+ * array of KeyData items.
320
+ *
321
+ * @returns Array of exported keys and passwords
322
+ */
323
+ exportKeys(): Promise<KeyData[]>;
324
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SudoCryptoProviderDefaults = void 0;
4
+ class SudoCryptoProviderDefaults {
5
+ }
6
+ exports.SudoCryptoProviderDefaults = SudoCryptoProviderDefaults;
7
+ SudoCryptoProviderDefaults.aesIVSize = 16;
8
+ SudoCryptoProviderDefaults.aesKeySize = 256;
9
+ SudoCryptoProviderDefaults.rsaKeySize = 2048;
10
+ SudoCryptoProviderDefaults.pbkdfRounds = 10000;
11
+ SudoCryptoProviderDefaults.pbkdfSaltSize = 16;
12
+ //# sourceMappingURL=sudoCryptoProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sudoCryptoProvider.js","sourceRoot":"","sources":["../../src/sudoKeyManager/sudoCryptoProvider.ts"],"names":[],"mappings":";;;AAIA,MAAa,0BAA0B;;AAAvC,gEAMC;AALwB,oCAAS,GAAG,EAAE,CAAA;AACd,qCAAU,GAAG,GAAG,CAAA;AAChB,qCAAU,GAAG,IAAI,CAAA;AACjB,sCAAW,GAAG,KAAK,CAAA;AACnB,wCAAa,GAAG,EAAE,CAAA"}