cipherize
v1.1.2
Published
A package for encryption decryption and Hashing using bcrypt and crypto
Downloads
16
Maintainers
Readme
Using Cipherize for Data Encryption and Decryption Cipherize is a npm package that provides functionality for encrypting and decrypting data securely. Follow the steps below to integrate Cipherize into your project:
Installation First, install the Cipherize package from npm by running the following command in your project directory:
install using
Usage Now you can use the Cipherize functions to encrypt, decrypt, hash, and compare data.
Once installed, initialize Cipherize in your project by requiring it:
Encrypting Data To encrypt data, use the encryptData function:
Decrypting Data To decrypt data, use the decryptData function:
Hashing Data To hash data, use the hashData function:
Comparing Hashes To compare hashed data with a value, use the compareHash function:
Test output
Note Cipherize operates on localhost by default. Ensure that your backend server is running on http://localhost:5000 or adjust the URLs accordingly if your server is hosted elsewhere.
Endpoints:
Key: http://localhost:5000/key (GET) Encrypt: http://localhost:5000/encrypt (POST) decryptData Function Similar to encryptData, this function retrieves the decryption key and IV by sending a GET request to the /key endpoint. Then it sends a POST request to the /decrypt endpoint to decrypt the encrypted data using the retrieved key and IV.
Endpoints: Key: http://localhost:5000/key (GET) Decrypt: http://localhost:5000/decrypt (POST) compareHash Function This function compares the provided value with the hashed value by sending a POST request to the /compareHash endpoint.
Endpoint: http://localhost:5000/compareHash (POST)
If you Find any difficulties with the documentation, you can also refer here for example code. github : https://github.com/manicdon7/cipherize-test
Author manikandan0508
License This project is licensed under the MIT License - see the LICENSE file for details.