66Popular cryptographic algorithms for [ Dart] ( https://dart.dev ) / [ Flutter] ( https://flutter.dev )
77developers.
88
9- Maintained by Gohilla . Licensed under the [ Apache License 2.0] ( LICENSE ) .
9+ Maintained by [ gohilla.com ] ( https://gohilla.com ) . Licensed under the [ Apache License 2.0] ( LICENSE ) .
1010
11- This package is:
11+ This package is designed to be :
1212
1313* __ Easy to use__ . The API is easy to understand and encourages good defaults.
1414* __ Multi-platform__ . It's easy to customize implementation of X in platform Y.
@@ -26,11 +26,15 @@ Any feedback, issue reports, or pull requests are appreciated!
2626
2727# Getting started
2828
29+ If you use Flutter, it's recommended (but not necessarily) that you also import our sibling package
30+ [ cryptography_flutter] ( https://pub.dev/packages/cryptography_flutter ) , which improves performance
31+ by using operating system APIs.
32+
2933In _ pubspec.yaml_ :
3034``` yaml
3135dependencies :
32- cryptography : ^2.4 .0
33- cryptography_flutter : ^2.2 .0 # Remove this if you are writing a pure Dart package without Flutter
36+ cryptography : ^2.5 .0
37+ cryptography_flutter : ^2.3 .0 # Remove if you don't use Flutter
3438` ` `
3539
3640You are ready to go!
@@ -39,14 +43,16 @@ You are ready to go!
3943
4044Please report bugs at [github.com/dint-dev/cryptography/issues](https://github.com/dint-dev/cryptography/issues).
4145
42- If you want discuss cryptography in Flutter/Dart projects with other developers, feel free to join
43- our community discussion at [github.com/dint-dev/cryptography/discussions](https://github.com/dint-dev/cryptography/discussions):
44- * Your experiences with the documentation and API design?
45- * What is the best way to achieve X?
46- * Etc.
46+ Having questions? Feel free to use our Github Discussions at
47+ [github.com/dint-dev/cryptography/discussions](https://github.com/dint-dev/cryptography/discussions).
48+
49+
50+ # Some things to know
51+ ## General guidance on cryptography
52+ Please read [information about Mobile App Cryptography](https://mas.owasp.org/MASTG/General/0x04g-Testing-Cryptography/)
53+ by OWASP. It contains a lot of useful information that helps you build more secure software.
4754
48- # Concepts
49- ## Cryptographic keys
55+ ## Common parameters
5056* [SecretKey](https://pub.dev/documentation/cryptography/latest/cryptography/SecretKey-class.html)
5157 * Used by ciphers, message authentication codes, and key derivation functions.
5258* [KeyPair](https://pub.dev/documentation/cryptography/latest/cryptography/KeyPair-class.html)
@@ -63,9 +69,6 @@ our community discussion at [github.com/dint-dev/cryptography/discussions](https
6369 (P-256 / P-384 / P-512 public keys)
6470 * [RsaPublicKey](https://pub.dev/documentation/cryptography/latest/cryptography/RsaPublicKey-class.html)
6571 (RSA public keys)
66- * Nonces (also known as "IV", "Initialization Vector", "salt") are non-secret byte sequences.
67- * AAD (Additional Authenticated Data) is some additional byte sequence that you want a cipher to
68- authenticate when you encrypt/decrypt.
6972
7073Note that SecretKey and KeyPair instances are opaque and asynchronous by default. They may not be in
7174the memory and may not be readable at all. If a SecretKey or KeyPair instance is in memory, it's an
@@ -92,7 +95,7 @@ three types of wands:
9295
9396In the future version 3.x, we plan to transition to wands as the default API for doing operations.
9497
95- ### Ciphers
98+ ## Ciphers
9699
97100The following [Cipher](https://pub.dev/documentation/cryptography/latest/cryptography/Cipher-class.html)
98101implementations are available:
@@ -118,7 +121,7 @@ implementations are available:
118121 * [Xchacha20.poly1305Aead](https://pub.dev/documentation/cryptography/latest/cryptography/Xchacha20/Xchacha20.poly1305Aead.html) (
119122 AEAD_XCHACHA20_POLY1305)
120123
121- ### Digital signature algorithms
124+ ## Digital signature algorithms
122125
123126The
124127following [SignatureAlgorithm](https://pub.dev/documentation/cryptography/latest/cryptography/SignatureAlgorithm-class.html)
@@ -143,7 +146,7 @@ implementations are available:
143146 RSASSA-PKCS1v15)
144147 * We don't have implementations of these in pure Dart.
145148
146- ### Key exchange algorithms
149+ ## Key exchange algorithms
147150
148151The following [KeyExchangeAlgorithm](https://pub.dev/documentation/cryptography/latest/cryptography/KeyExchangeAlgorithm-class.html)
149152implementations are available:
@@ -169,15 +172,15 @@ The following implementations are available:
169172* [Pbkdf2](https://pub.dev/documentation/cryptography/latest/cryptography/Pbkdf2-class.html) (
170173 PBKDF2)
171174
172- ### Message authentication codes
175+ ## Message authentication codes
173176
174177The following [MacAlgorithm](https://pub.dev/documentation/cryptography/latest/cryptography/MacAlgorithm-class.html)
175178implementations are available:
176179
177180* [Hmac](https://pub.dev/documentation/cryptography/latest/cryptography/Hmac-class.html)
178181* [Poly1305](https://pub.dev/documentation/cryptography/latest/cryptography/Poly1305-class.html)
179182
180- ### Cryptographic hash functions
183+ ## Cryptographic hash functions
181184
182185The following [HashAlgorithm](https://pub.dev/documentation/cryptography/latest/cryptography/HashAlgorithm-class.html)
183186implementations are available:
@@ -202,7 +205,7 @@ lots of small hashes, the advantage is even bigger because this package allows y
202205state. Therefore our HMAC-SHA256 is much faster too. In browsers, hashes can be over 100 times
203206faster because this package automatically uses Web Crypto API.
204207
205- ### Random number generators
208+ ## Random number generators
206209
207210We continue to use the old good ` Random.secure()` as the default random number in all APIs.
208211
0 commit comments