Skip to content

Commit 457dc0c

Browse files
authored
Merge pull request #203 from dint-dev/fix/cryptography_flutter
Fix issues in cryptography_flutter.
2 parents cf3b1ba + ca2d6dd commit 457dc0c

File tree

145 files changed

+1663
-1515
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+1663
-1515
lines changed

.github/workflows/dart.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
matrix:
2525
package:
2626
- cryptography
27+
- cryptography_test
2728
- jwk
2829
sdk:
2930
# The oldest supported Dart SDK at the moment.
@@ -128,6 +129,7 @@ jobs:
128129
matrix:
129130
package:
130131
- cryptography_flutter
132+
- cryptography_flutter/example
131133
- cryptography_flutter_integration_test
132134
sdk:
133135
# The oldest supported Dart SDK at the moment.

cryptography/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ dev_dependencies:
2424
#
2525
# Packages by Google:
2626
#
27-
lints: '>=3.0.0 <7.0.0'
27+
lints: '>=3.0.0 <7.0.0' # A large range is needed because we support old Flutter SDKs
2828
test: ^1.24.0

cryptography_flutter/.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
*.swp
66
.DS_Store
77
.atom/
8+
.build/
89
.buildlog/
910
.history
1011
.svn/
12+
.swiftpm/
1113
migrate_working_dir/
1214

1315
# IntelliJ related
@@ -26,5 +28,6 @@ migrate_working_dir/
2628
/pubspec.lock
2729
**/doc/api/
2830
.dart_tool/
29-
.packages
30-
build/
31+
.flutter-plugins-dependencies
32+
/build/
33+
/coverage/

cryptography_flutter/.metadata

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,33 @@
44
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: 652bc59414cf04fd841e15b250c1de4fda00d38a
8-
channel: master
7+
revision: "f5a8537f90d143abd5bb2f658fa69c388da9677b"
8+
channel: "stable"
99

1010
project_type: plugin
11+
12+
# Tracks metadata for the flutter migrate command
13+
migration:
14+
platforms:
15+
- platform: root
16+
create_revision: f5a8537f90d143abd5bb2f658fa69c388da9677b
17+
base_revision: f5a8537f90d143abd5bb2f658fa69c388da9677b
18+
- platform: android
19+
create_revision: f5a8537f90d143abd5bb2f658fa69c388da9677b
20+
base_revision: f5a8537f90d143abd5bb2f658fa69c388da9677b
21+
- platform: ios
22+
create_revision: f5a8537f90d143abd5bb2f658fa69c388da9677b
23+
base_revision: f5a8537f90d143abd5bb2f658fa69c388da9677b
24+
- platform: macos
25+
create_revision: f5a8537f90d143abd5bb2f658fa69c388da9677b
26+
base_revision: f5a8537f90d143abd5bb2f658fa69c388da9677b
27+
28+
# User provided section
29+
30+
# List of Local paths (relative to this file) that should be
31+
# ignored by the migrate tool.
32+
#
33+
# Files that are not part of the templates will be ignored by default.
34+
unmanaged_files:
35+
- 'lib/main.dart'
36+
- 'ios/Runner.xcodeproj/project.pbxproj'

cryptography_flutter/CHANGELOG.md

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## 2.3.3
22
* Improves dependency constraints.
3+
* Fixes problems when building the plugin.
34

45
## 2.3.2
56
* Improves documentation.
@@ -9,30 +10,30 @@
910
* Fixes type inference warnings by Swift compiler.
1011

1112
## 2.3.0
12-
* Adds support for algorithms. In this version, the following operating system API adapters pass
13+
* Adds support for algorithms. In this version, the following operating system API adapters pass
1314
tests:
14-
* Android:
15-
* FlutterAesGcm
16-
* FlutterChacha20.poly1305Aead()
17-
* FlutterHmac.sha1()
18-
* FlutterHmac.sha224()
19-
* FlutterHmac.sha256()
20-
* FlutterHmac.sha384()
21-
* FlutterHmac.sha512()
22-
* FlutterPbkdf2()
23-
* Apple operating systems:
24-
* FlutterAesGcm
25-
* FlutterChacha20.poly1305Aead()
26-
* FlutterEd25519()
27-
* FlutterEcdh.p256()
28-
* FlutterEcdh.p384()
29-
* FlutterEcdh.p521()
30-
* FlutterEcdsa.p256()
31-
* FlutterEcdsa.p384()
32-
* FlutterEcdsa.p521()
33-
* FlutterHmac.sha256()
34-
* FlutterHmac.sha512()
35-
* FlutterX25519()
15+
* Android:
16+
* FlutterAesGcm
17+
* FlutterChacha20.poly1305Aead()
18+
* FlutterHmac.sha1()
19+
* FlutterHmac.sha224()
20+
* FlutterHmac.sha256()
21+
* FlutterHmac.sha384()
22+
* FlutterHmac.sha512()
23+
* FlutterPbkdf2()
24+
* Apple operating systems:
25+
* FlutterAesGcm
26+
* FlutterChacha20.poly1305Aead()
27+
* FlutterEd25519()
28+
* FlutterEcdh.p256()
29+
* FlutterEcdh.p384()
30+
* FlutterEcdh.p521()
31+
* FlutterEcdsa.p256()
32+
* FlutterEcdsa.p384()
33+
* FlutterEcdsa.p521()
34+
* FlutterHmac.sha256()
35+
* FlutterHmac.sha512()
36+
* FlutterX25519()
3637
* Requires "package:cryptography" 2.5.0, which has enough DER encoding/decoding support for us to
3738
use Apple's CryptoKit ECDH/ECDSA functions.
3839
* Adds support for reading names of crypto providers in Android.

cryptography_flutter/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ In _pubspec.yaml_:
5151

5252
```yaml
5353
dependencies:
54-
cryptography: ^2.7.0
55-
cryptography_flutter: ^2.3.2
54+
cryptography: ^2.8.0
55+
cryptography_flutter: ^2.3.3
5656
```
5757
5858
That's it!
Lines changed: 33 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
group 'dev.dint.cryptography_flutter'
2-
version '1.0-SNAPSHOT'
1+
group = "dev.dint.cryptography_flutter"
2+
version = "1.0-SNAPSHOT"
33

44
buildscript {
5-
ext.kotlin_version = '1.7.10'
5+
ext.kotlin_version = "2.2.20"
66
repositories {
77
google()
88
mavenCentral()
99
}
1010

1111
dependencies {
12-
classpath 'com.android.tools.build:gradle:7.2.0'
13-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
12+
classpath("com.android.tools.build:gradle:8.11.1")
13+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
1414
}
1515
}
1616

@@ -21,35 +21,50 @@ allprojects {
2121
}
2222
}
2323

24-
apply plugin: 'com.android.library'
25-
apply plugin: 'kotlin-android'
24+
apply plugin: "com.android.library"
25+
apply plugin: "kotlin-android"
2626

2727
android {
28-
if (project.android.hasProperty("namespace")) {
29-
namespace "dev.dint.cryptography_flutter"
30-
}
28+
namespace = "dev.dint.cryptography_flutter"
3129

32-
compileSdkVersion 31
30+
compileSdk = 36
3331

3432
compileOptions {
35-
sourceCompatibility JavaVersion.VERSION_1_8
36-
targetCompatibility JavaVersion.VERSION_1_8
33+
sourceCompatibility = JavaVersion.VERSION_17
34+
targetCompatibility = JavaVersion.VERSION_17
3735
}
3836

3937
kotlinOptions {
40-
jvmTarget = '1.8'
38+
jvmTarget = JavaVersion.VERSION_17
4139
}
4240

4341
sourceSets {
44-
main.java.srcDirs += 'src/main/kotlin'
42+
main.java.srcDirs += "src/main/kotlin"
43+
test.java.srcDirs += "src/test/kotlin"
4544
}
4645

4746
defaultConfig {
48-
minSdkVersion 21
47+
minSdk = 24
48+
}
49+
50+
dependencies {
51+
testImplementation("org.jetbrains.kotlin:kotlin-test")
52+
testImplementation("org.mockito:mockito-core:5.0.0")
53+
}
54+
55+
testOptions {
56+
unitTests.all {
57+
useJUnitPlatform()
58+
59+
testLogging {
60+
events "passed", "skipped", "failed", "standardOut", "standardError"
61+
outputs.upToDateWhen {false}
62+
showStandardStreams = true
63+
}
64+
}
4965
}
5066
}
5167

5268
dependencies {
53-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
54-
implementation "androidx.security:security-crypto:1.1.0-alpha05"
69+
implementation "androidx.security:security-crypto:1.1.0"
5570
}

cryptography_flutter/android/gradle.properties

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)