https://github.com/juliogarciape/crypi
A fun and simple security library for NodeJS with easy integration
https://github.com/juliogarciape/crypi
algorithms caesar-cipher encryption-decryption security-library security-tools
Last synced: about 1 month ago
JSON representation
A fun and simple security library for NodeJS with easy integration
- Host: GitHub
- URL: https://github.com/juliogarciape/crypi
- Owner: juliogarciape
- License: gpl-3.0
- Created: 2024-08-28T22:28:25.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-09-20T23:17:05.000Z (9 months ago)
- Last Synced: 2025-04-03T16:52:28.812Z (2 months ago)
- Topics: algorithms, caesar-cipher, encryption-decryption, security-library, security-tools
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/crypi
- Size: 85.9 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Crypi :snake:



**A fun and simple security library for NodeJS with easy integration**
## Support Us :sparkling_heart:
If you find this project useful and want us to keep improving it, please consider:
- **Star the Repo**: [Give it a star](https://github.com/juliogarciape/crypi) on GitHub to help increase its visibility.
- **Share**: Let others know about this project.## Installation :package:
To install Crypi, use npm:
```sh
npm install crypi
```## Usage :computer:
Import the package into your project:
```javascript
import { caesarCipher, caesarDecipher } from 'crypi';
```Encrypt a message:
```javascript
const originalText = 'Hello World!';
const encryptedText = caesarCipher(originalText);
console.log('Encrypted text:', encryptedText);
```Decrypt a message:
```javascript
const decryptedText = caesarDecipher(encryptedText);
console.log('Decrypted text:', decryptedText);
```## Documentation :book:
### > Caesar Cipher:
The Caesar Cipher is a substitution cipher used in cryptography that shifts the alphabet by a fixed number of positions. It is one of the simplest and most widely known encryption techniques.
#### caesarCipher (text: string, shift: number = 3): string
Encrypts a message using the Caesar cipher.
- `text`: The message to be encrypted.
- `shift`: The number of positions to shift the alphabet. Default is 3.#### caesarDecipher (text: string, shift: number = 3): string
Decrypts a message using the Caesar cipher.
- `text`: The message to be decrypted.
- `shift`: The number of positions to shift the alphabet. Default is 3.> [!NOTE]
> During encryption using the **`caesarCipher`** function, characters not part of the Latin alphabet, such as uppercase letters, accented characters, non-alphanumeric characters, or numbers, will be ignored and will retain their original form.## Contributing :handshake:
Contributions are welcome! If you have a major change in mind, please open an `Issue` to discuss it before submitting a `Pull Request`.
## License :scroll:
This project is licensed under the GNU General Public License v3.0 see the [LICENSE](LICENSE) file for details.
## Contact :email:
For questions or support, please contact me at [[email protected]](mailto:[email protected]).