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
e337b1d2
Commit
e337b1d2
authored
Nov 04, 2015
by
Matt Perry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure seedRandom doesn't throw if /dev/urandom doesn't exist.
parent
d74a7517
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
signing.dart
packages/flx/lib/signing.dart
+10
-4
pubspec.yaml
packages/flx/pubspec.yaml
+1
-1
No files found.
packages/flx/lib/signing.dart
View file @
e337b1d2
...
...
@@ -30,10 +30,16 @@ class CipherParameters {
// Disclaimer: I don't really understand why we need 2 parameters for
// cipher's API.
Future
seedRandom
()
async
{
RandomAccessFile
file
=
await
new
File
(
"/dev/urandom"
).
open
();
Uint8List
key
=
new
Uint8List
.
fromList
(
await
file
.
read
(
16
));
Uint8List
iv
=
new
Uint8List
.
fromList
(
await
file
.
read
(
16
));
_initRandom
(
key
,
iv
);
try
{
RandomAccessFile
file
=
await
new
File
(
"/dev/urandom"
).
open
();
Uint8List
key
=
new
Uint8List
.
fromList
(
await
file
.
read
(
16
));
Uint8List
iv
=
new
Uint8List
.
fromList
(
await
file
.
read
(
16
));
_initRandom
(
key
,
iv
);
}
on
FileSystemException
{
// TODO(mpcomplete): need an entropy source on Windows. We might get this
// for free from Dart itself soon.
print
(
"Warning: Failed to seed random number generator. No /dev/urandom."
);
}
}
SecureRandom
_random
;
...
...
packages/flx/pubspec.yaml
View file @
e337b1d2
name
:
flx
version
:
0.0.
7
version
:
0.0.
8
author
:
Flutter Authors <flutter-dev@googlegroups.com>
description
:
Library for dealing with Flutter bundle (.flx) files
homepage
:
http://flutter.io
...
...
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