Release Notes for Habibi v1.0.3
Release Date: 2024-05-26
A package to encrypt and decrypt PII fields with love and care
Key Features:
- Customizable PII Fields: Define which fields in your objects should be encrypted and decrypted.
- Encryption and Decryption Functions: Provide custom functions for encrypting and decrypting strings.
- Hashing Function: Add an optional hashing function for enhanced security.
- Error Handling and Logging: Customize error logging and choose whether to stop processing on errors.
- Efficient Processing: Optimized to skip empty strings and handle nested objects and arrays.
Configuration Options:
piiFields
: Array of fields to encrypt/decrypt (default:['nik', 'phoneNumber', 'email', 'createdBy', 'updatedBy']
).encryptFn
: Function to encrypt strings (default:str => 'ENCRYPTED_' + str
).decryptFn
: Function to decrypt strings (default:str => str.replace('ENCRYPTED_', '')
).hashFn
: Function to hash strings (default:str => 'HASHED_' + str
).logger
: Function to log errors (default:console.log
).stopOnError
: Boolean to stop processing on error (default:false
).
Installation:
To install the package, run:
npm install @zakyyudha/habibi