File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ Good mood
56
56
57
57
#### Cipher
58
58
[ 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 )
59
60
| [ ChaCha20] ( http://cr.yp.to/chacha/chacha-20080128.pdf )
60
61
| [ Rabbit] ( https://tools.ietf.org/html/rfc4503 )
61
62
| [ Blowfish] ( https://www.schneier.com/academic/blowfish/ )
@@ -220,6 +221,7 @@ See: [Package.swift - manual](http://blog.krzyzanowskim.com/2016/08/09/package-s
220
221
* [ Password-Based Key Derivation Function (PBKDF2, ...)] ( #password-based-key-derivation-functions )
221
222
* [ HMAC-based Key Derivation Function (HKDF)] ( #hmac-based-key-derivation-function )
222
223
* [ Data Padding] ( #data-padding )
224
+ * [ Salsa20] ( #salsa20 )
223
225
* [ ChaCha20] ( #chacha20 )
224
226
* [ Rabbit] ( #rabbit )
225
227
* [ Blowfish] ( #blowfish )
@@ -364,6 +366,13 @@ Padding.pkcs7.add(to: bytes, blockSize: AES.blockSize)
364
366
```
365
367
366
368
#### 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
+
367
376
##### ChaCha20
368
377
369
378
``` swift
You can’t perform that action at this time.
0 commit comments