Skip to content

Commit 5a5d3f2

Browse files
committed
Updated Readme
1 parent 43bd963 commit 5a5d3f2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ Good mood
5656

5757
#### Cipher
5858
[AES-128, AES-192, AES-256](http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf)
59+
| [Salsa20](https://cr.yp.to/snuffle/spec.pdf)
5960
| [ChaCha20](http://cr.yp.to/chacha/chacha-20080128.pdf)
6061
| [Rabbit](https://tools.ietf.org/html/rfc4503)
6162
| [Blowfish](https://www.schneier.com/academic/blowfish/)
@@ -220,6 +221,7 @@ See: [Package.swift - manual](http://blog.krzyzanowskim.com/2016/08/09/package-s
220221
* [Password-Based Key Derivation Function (PBKDF2, ...)](#password-based-key-derivation-functions)
221222
* [HMAC-based Key Derivation Function (HKDF)](#hmac-based-key-derivation-function)
222223
* [Data Padding](#data-padding)
224+
* [Salsa20](#salsa20)
223225
* [ChaCha20](#chacha20)
224226
* [Rabbit](#rabbit)
225227
* [Blowfish](#blowfish)
@@ -364,6 +366,13 @@ Padding.pkcs7.add(to: bytes, blockSize: AES.blockSize)
364366
```
365367

366368
#### Working with Ciphers
369+
##### Salsa20
370+
371+
```swift
372+
let encrypted = try Salsa20(key: key, iv: iv).encrypt(message)
373+
let decrypted = try Salsa20(key: key, iv: iv).decrypt(encrypted)
374+
```
375+
367376
##### ChaCha20
368377

369378
```swift

0 commit comments

Comments
 (0)