https://github.com/iolanguage/blowfish
https://github.com/iolanguage/blowfish
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/iolanguage/blowfish
- Owner: IoLanguage
- License: bsd-3-clause
- Created: 2018-03-11T11:50:22.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-16T09:40:18.000Z (about 8 years ago)
- Last Synced: 2025-03-14T05:44:45.390Z (over 1 year ago)
- Language: C
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Blowfish
The Blowfish object can be used to do encryption and decryption using
the Blowfish keyed, symmetric block cipher.
Example encryption and decription:
```Io
key := "secret"
data := "this is a message"
encryptedData := Blowfish clone setKey(key) encrypt(data)
decryptedData := Blowfish clone setKey(key) decrypt(encryptedData)
```
Or using the stream API:
```Io
key := "secret"
data := "this is a message"
cipher = Blowfish clone
cipher setIsEncrypting(true)
cipher setKey(key)
cipher beginProcessing
cipher inputBuffer appendSeq(data)
cipher process
cipher endProcess
encryptedData := cipher outputBuffer
cipher = Blowfish clone
cipher setIsEncrypting(false)
cipher setKey(key)
cipher beginProcessing
cipher inputBuffer appendSeq(encryptedData)
cipher process
cipher endProcess
decryptedData := cipher outputBuffer
```
# Installation
```
eerie install https://github.com/IoLanguage/Blowfish.git
```