Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/finsberg/caesar_cipher_in1910
Repo for IN1910 to illustrate testing with caesar cipher as a use case
https://github.com/finsberg/caesar_cipher_in1910
Last synced: 3 days ago
JSON representation
Repo for IN1910 to illustrate testing with caesar cipher as a use case
- Host: GitHub
- URL: https://github.com/finsberg/caesar_cipher_in1910
- Owner: finsberg
- License: mit
- Created: 2021-08-23T11:51:43.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-11-17T08:42:31.000Z (12 months ago)
- Last Synced: 2023-11-17T09:58:02.230Z (12 months ago)
- Language: Python
- Homepage: https://finsberg.github.io/caesar_cipher_in1910/
- Size: 201 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
[![CI](https://github.com/finsberg/caesar_cipher_in1910/actions/workflows/main.yml/badge.svg)](https://github.com/finsberg/caesar_cipher_in1910/actions/workflows/main.yml)
[![codecov](https://codecov.io/gh/finsberg/caesar_cipher_in1910/branch/master/graph/badge.svg?token=9VRTVLANGL)](https://codecov.io/gh/finsberg/caesar_cipher_in1910)# Learn testing using Caesar Cipher
In this repo we implement a simple Caesar Cipher algorithm and test some functionality. For more info on how the Caesar Cipher is working check out [Wikipedia](https://en.wikipedia.org/wiki/Caesar_cipher)
## Install
You need python3. No additional packages are required## Usage
Select a secret key, i.e a shift.### Encryption
```python
import caesar_cipher
secret_shift = 5
message = "hello"
encypted_message = caesar_cipher.encrypt(message, shift=secret_shift)
```### Decryption
```python
import caesar_cipher
secret_shift = 5
message = caesar_cipher.decrypt(decrypted_message, shift=secret_shift)
```## Automated tests
You can run the tests using `pytest`
```
python -m pytest test_caesar_cipher.py
```## Limitations
This code has quite a lot of limitations
- It only support letters and all letters are converted to lower case. This mean that you cannot encrypt / decrypt messages containing numbers or special characters
- You can only encrypt / decrypt single word, not sentences## Contributing
Contributions are welcomed, see [CONTRIBUTING.md](CONTRIBUTING.md) for more info