Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
5b090383
Commit
5b090383
authored
Mar 23, 2016
by
Ian Hickson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2840 from Hixie/crypto92
Port to crypto 0.9.2
parents
cae847dc
87eb3424
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
10 deletions
+13
-10
utils.dart
packages/flutter_tools/lib/src/base/utils.dart
+8
-3
pubspec.yaml
packages/flutter_tools/pubspec.yaml
+1
-1
signing.dart
packages/flx/lib/signing.dart
+3
-5
pubspec.yaml
packages/flx/pubspec.yaml
+1
-1
No files found.
packages/flutter_tools/lib/src/base/utils.dart
View file @
5b090383
...
...
@@ -7,10 +7,15 @@ import 'dart:io';
import
'package:crypto/crypto.dart'
;
String
hex
(
List
<
int
>
bytes
)
{
StringBuffer
result
=
new
StringBuffer
();
for
(
int
part
in
bytes
)
result
.
write
(
'
${part < 16 ? '0' : ''}${part.toRadixString(16)}
'
);
return
result
.
toString
();
}
String
calculateSha
(
File
file
)
{
SHA1
sha1
=
new
SHA1
();
sha1
.
add
(
file
.
readAsBytesSync
());
return
CryptoUtils
.
bytesToHex
(
sha1
.
close
());
return
hex
(
sha1
.
convert
(
file
.
readAsBytesSync
()).
bytes
);
}
/// Convert `foo_bar` to `fooBar`.
...
...
packages/flutter_tools/pubspec.yaml
View file @
5b090383
...
...
@@ -11,7 +11,7 @@ dependencies:
analyzer
:
'
>=0.26.1+17'
# see note below
archive
:
^1.0.20
args
:
^0.13.4
crypto
:
^0.9.
1
crypto
:
^0.9.
2
den_api
:
^0.1.0
file
:
^0.1.0
mustache4dart
:
^1.0.0
...
...
packages/flx/lib/signing.dart
View file @
5b090383
...
...
@@ -3,13 +3,13 @@
// found in the LICENSE file.
import
'dart:async'
;
import
'dart:convert'
hide
BASE64
;
import
'dart:convert'
;
import
'dart:io'
;
import
'dart:typed_data'
;
import
'package:asn1lib/asn1lib.dart'
;
import
'package:bignum/bignum.dart'
;
import
'package:crypto/crypto.dart'
;
import
'package:crypto/crypto.dart'
hide
BASE64
,
Digest
;
import
'package:pointycastle/pointycastle.dart'
;
export
'package:pointycastle/pointycastle.dart'
show
AsymmetricKeyPair
,
PublicKey
,
PrivateKey
;
...
...
@@ -82,9 +82,7 @@ Uint8List serializeManifest(Map<String, dynamic> manifestDescriptor, ECPublicKey
if
(
publicKey
!=
null
)
outputManifest
[
'key'
]
=
BASE64
.
encode
(
publicKey
.
Q
.
getEncoded
());
SHA256
sha
=
new
SHA256
();
sha
.
add
(
zipBytes
);
List
<
int
>
hash
=
sha
.
close
();
List
<
int
>
hash
=
sha256
.
convert
(
zipBytes
).
bytes
;
BigInteger
zipHashInt
=
new
BigInteger
.
fromBytes
(
1
,
hash
);
outputManifest
[
'content-hash'
]
=
zipHashInt
.
intValue
();
...
...
packages/flx/pubspec.yaml
View file @
5b090383
...
...
@@ -7,7 +7,7 @@ dependencies:
bignum
:
^0.1.0
asn1lib
:
^0.4.1
pointycastle
:
0.10.0
crypto
:
^0.9.
1
crypto
:
^0.9.
2
environment
:
sdk
:
'
>=1.12.0
<2.0.0'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment