Skip to content

Commit

Permalink
2.0.0-nullsafety.0: A much better API and fixes many implementation i…
Browse files Browse the repository at this point in the history
…ssues.

The older version 1.x API will not be supported anymore.
We recommend that developers migrate to the version 2.x API as soon as possible.
  • Loading branch information
terrier989 committed Dec 31, 2020
1 parent 04b0746 commit b86fb5c
Show file tree
Hide file tree
Showing 326 changed files with 21,452 additions and 18,359 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ jobs:

- name: Install dependencies (cryptography)
working-directory: cryptography
run: pub get
run: dart pub get

- name: Install dependencies (kms)
working-directory: kms
run: pub get
- name: Install dependencies (jwk)
working-directory: jwk
run: dart pub get

- name: Run tests (cryptography)
working-directory: cryptography
run: pub run test --platform=vm
run: dart test --platform=vm

- name: Run tests (kms)
working-directory: kms
run: pub run test --platform=vm
- name: Run tests (jwk)
working-directory: jwk
run: dart test --platform=vm
44 changes: 42 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,46 @@ pubspec.lock
# If you don't generate documentation locally you can remove this line.
doc/api/

# IDEs
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
.VSCode/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
.vscode/

# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.flutter-plugins
.flutter-plugins-dependencies
.pub-cache/
/build/

# Web related
lib/generated_plugin_registrant.dart

# Symbolication related
app.*.symbols

# Obfuscation related
app.*.map.json

# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@

Cryptographic packages for [Dart](https://dart.dev) / [Flutter](https://flutter.dev) developers.

This package is maintained by Gohilla Ltd (Finland) and open-sourced under the
[Apache License 2.0](LICENSE).

Want to contribute? Please share feedback / issue reports in the
[issue tracker](https://github.com/dint-dev/cryptography/issues). Pull requests are welcome.

## Packages
* [cryptography](cryptography)
* Covers:
* Ciphers (AES, ChaCha20/XChaCha20)
* Ciphers (AES, Chacha20/Xchacha20)
* Digital signature algorithms (ED25519, P256/P384/P521, RSA-PSS, RSASSA-PKCS1-V15)
* Key exchange algorithms (P256/P384/P521, X25519)
* Message authentication codes (HMAC, Poly1305)
Expand Down
44 changes: 42 additions & 2 deletions cryptography/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,46 @@ pubspec.lock
# If you don't generate documentation locally you can remove this line.
doc/api/

# IDEs
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
.VSCode/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
.vscode/

# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.flutter-plugins
.flutter-plugins-dependencies
.pub-cache/
/build/

# Web related
lib/generated_plugin_registrant.dart

# Symbolication related
app.*.symbols

# Obfuscation related
app.*.map.json

# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release
24 changes: 15 additions & 9 deletions cryptography/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 2.0.0-nullsafety.0
* BREAKING CHANGES: Many breaking API changes that make the API easier to understand and use.
* IMPORTANT FIXES: Improves tests and fixes a number of bugs we spotted. We don't plan to support
the 1.x API. We highly recommend you migrate to the 2.x API.
* The first null-safe version.

## 1.4.1
* Improves Web Cryptography support internally.
* The implementation is now easier to read.
Expand All @@ -18,9 +24,9 @@

## 1.2.0
* Adds `RsaPss` and `RsaPkcs1v15` (Web Cryptography only).
* BREAKING CHANGE: Recently added `JwkPrivateKey` is now `EcJwkPrivateKey`.
* Adds `EcJwkPrivateKey` and `EcJwkPublicKey`.
* Adds `RsaJwkPrivateKey` and `RsaJwkPublicKey`.
* BREAKING CHANGE: Recently added `JwkSecretKey` is now `EcJwkSecretKey`.
* Adds `EcJwkSecretKey` and `EcJwkPublicKey`.
* Adds `RsaJwkSecretKey` and `RsaJwkPublicKey`.

## 1.1.1
* Small fixes to documentation and internal declarations.
Expand All @@ -34,12 +40,12 @@
* `Cipher` has new getters `nonceLengthMin` and `nonceLengthMax`.
* AES-GCM is supported in the VM too.
* AES performance is improved significantly.
* Adds `JwkPrivateKey`.
* BREAKING CHANGE: JwkPrivateKey (instead of previous unspecified format) becomes the private key
* Adds `JwkSecretKey`.
* BREAKING CHANGE: JwkSecretKey (instead of previous unspecified format) becomes the private key
storage format for P-256/P-384/P-521. Any attempt to use the previous unspecified format will
lead to errors. It's unlikely that anyone is affected by this change so we don't bump the major
version.
* `SecretKey` and `PrivateKey` now have property `Map<Object,Object> cachedValues`, which can
* `SecretKey` and `SecretKey` now have property `Map<Object,Object> cachedValues`, which can
be used for caching objects needed for cryptographic operations (such as handles to Web
Cryptography API objects).
* Hides utils from developers.
Expand All @@ -65,7 +71,7 @@
* Better documentation and benchmarks.

## 1.0.1
* Implements `ed25519.newKeyPairFromSeed(seed)`.
* Implements `ed25519.newKeyFromSeed(seed)`.
* Significantly improves ED25519 performance.
* Small fixes in documentation.

Expand All @@ -76,7 +82,7 @@
* Documentation fixes.

## 0.3.5
* Adds _XChaCha20_ cipher.
* Adds _Xchacha20_ cipher.
* When authenticated ciphers encounter incorrect MACs, they now throw `MacValidationException`
(instead of returning null, which developers may ignore in some situations).

Expand All @@ -103,7 +109,7 @@

## 0.2.6
* Fixed an issue with dependency constraints that conflict with Flutter SDK.
* PrivateKey / SecretKey property `bytes` is deprecated and replaced with `extract()` and
* SecretKey / SecretKey property `bytes` is deprecated and replaced with `extract()` and
`extractSync()` to better support implementations that protect the underlying bytes such as
Web Cryptography API.
* Improves documentation.
Expand Down
33 changes: 32 additions & 1 deletion cryptography/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,35 @@
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS
END OF TERMS AND CONDITIONS

-------------------------------------------------------------------------------
This version of package:cryptography contains source files copied from
package:crypto, which had the following license:

Copyright 2015, the Dart project authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Loading

0 comments on commit b86fb5c

Please sign in to comment.