@digitaldefiance/ecies-lib 2.1.3 → 2.1.4
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 +6 -20
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -355,28 +355,14 @@ key.dispose(); // Zero memory
|
|
|
355
355
|
|
|
356
356
|
## Value Objects
|
|
357
357
|
|
|
358
|
-
Type-safe
|
|
358
|
+
Type-safe wrapper:
|
|
359
359
|
|
|
360
360
|
```typescript
|
|
361
|
-
import { EmailString
|
|
361
|
+
import { EmailString } from '@digitaldefiance/ecies-lib';
|
|
362
362
|
|
|
363
363
|
// Validated emails
|
|
364
364
|
const email = new EmailString('user@example.com');
|
|
365
365
|
// new EmailString('invalid'); // throws InvalidEmailError
|
|
366
|
-
|
|
367
|
-
// GUIDs with multiple formats
|
|
368
|
-
const guid = GuidV4.new();
|
|
369
|
-
console.log(guid.asFullHexGuid); // "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
|
370
|
-
console.log(guid.asShortHexGuid); // "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
|
371
|
-
console.log(guid.asBase64Guid); // Base64
|
|
372
|
-
console.log(guid.asBigIntGuid); // BigInt
|
|
373
|
-
|
|
374
|
-
// Create from formats
|
|
375
|
-
const fromHex = new GuidV4('550e8400-e29b-41d4-a716-446655440000');
|
|
376
|
-
const fromBase64 = new GuidV4('VQ6EAOKbQdSnFkRmVUQAAA==');
|
|
377
|
-
|
|
378
|
-
// Compare
|
|
379
|
-
if (guid.equals(fromHex)) { /* ... */ }
|
|
380
366
|
```
|
|
381
367
|
|
|
382
368
|
## Error Handling
|
|
@@ -411,7 +397,6 @@ try {
|
|
|
411
397
|
// Error categories:
|
|
412
398
|
// - ECIESError: Encryption/decryption
|
|
413
399
|
// - MemberError: Member operations
|
|
414
|
-
// - GuidError: GUID validation
|
|
415
400
|
// - Pbkdf2Error: Key derivation
|
|
416
401
|
// - LengthError: Data length
|
|
417
402
|
// - SecureStorageError: Memory operations
|
|
@@ -445,7 +430,6 @@ src/
|
|
|
445
430
|
├── secure-string.ts # SecureString
|
|
446
431
|
├── secure-buffer.ts # SecureBuffer
|
|
447
432
|
├── email-string.ts # EmailString
|
|
448
|
-
├── guid.ts # GuidV4
|
|
449
433
|
├── utils.ts # Utilities
|
|
450
434
|
├── i18n-setup.ts # i18n configuration
|
|
451
435
|
└── index.ts # Public API
|
|
@@ -581,7 +565,7 @@ export { AESGCMService, Pbkdf2Service, PasswordLoginService, XorService };
|
|
|
581
565
|
export { Member, MemberType };
|
|
582
566
|
|
|
583
567
|
// Secure Primitives
|
|
584
|
-
export { SecureString, SecureBuffer, EmailString
|
|
568
|
+
export { SecureString, SecureBuffer, EmailString };
|
|
585
569
|
|
|
586
570
|
// Configuration
|
|
587
571
|
export { Constants, ConstantsRegistry, CHECKSUM, ECIES, PBKDF2 };
|
|
@@ -594,7 +578,7 @@ export { EciesEncryptionTypeEnum, Pbkdf2ProfileEnum };
|
|
|
594
578
|
export { MemberErrorType, ECIESErrorTypeEnum };
|
|
595
579
|
|
|
596
580
|
// Errors
|
|
597
|
-
export { ECIESError, MemberError,
|
|
581
|
+
export { ECIESError, MemberError, Pbkdf2Error };
|
|
598
582
|
export { LengthError, SecureStorageError, InvalidEmailError };
|
|
599
583
|
|
|
600
584
|
// Utilities
|
|
@@ -659,6 +643,8 @@ const passwordLogin = new PasswordLoginService(ecies, pbkdf2);
|
|
|
659
643
|
|
|
660
644
|
## ChangeLog
|
|
661
645
|
|
|
646
|
+
### v2.1.4 - minor version bump from i18n lib
|
|
647
|
+
|
|
662
648
|
### v2.1.3 - drop GUID altogether for ObjectID via BSON for better compatibility with node-ecies
|
|
663
649
|
|
|
664
650
|
### v2.1.2 - add faux GUID support for MongoDB ObjectIds
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digitaldefiance/ecies-lib",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.4",
|
|
4
4
|
"description": "Digital Defiance ECIES Library",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"license": "MIT",
|
|
35
35
|
"packageManager": "yarn@4.10.3",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@digitaldefiance/i18n-lib": "2.1.
|
|
37
|
+
"@digitaldefiance/i18n-lib": "2.1.4",
|
|
38
38
|
"@ethereumjs/wallet": "^10.0.0",
|
|
39
39
|
"@noble/curves": "^2.0.1",
|
|
40
40
|
"@noble/hashes": "^2.0.1",
|